The following code uses a redundant unsafe block inside a closure.
This is a warning on stable but there is no warning on nightly.
To reproduce (playground):
fn main() {
let mut v = Vec::<i32>::with_capacity(24);
unsafe {
let f = |v: &mut Vec<_>| {
unsafe {
v.set_len(24);
}
};
v.set_len(0);
f(&mut v);
}
}
Probably due to #44700, cc @arielb1
The following code uses a redundant
unsafeblock inside a closure.This is a warning on stable but there is no warning on nightly.
To reproduce (playground):
Probably due to #44700, cc @arielb1