Closed
Description
This should be fixed by @nikomatsakis's new patch even if the code isn't changed, but I thought it would be nice to track too.
use std::fmt;
struct NoisyDrop<T: fmt::Debug>(T);
impl<T: fmt::Debug> Drop for NoisyDrop<T> {
fn drop(&mut self) {
let _ = vec!["0wned"];
println!("dropping {:?}", self.0)
}
}
fn foo() {
let (w,v);
v = vec![0usize];
w = {
let u = NoisyDrop(&v);
move || u.0.len()
};
}
fn main() { foo() }
After this, the only non-trivial variants dropck correctly handles are TySlice
and TyTuple
- I guess even a stopped clock is right twice a day.
Metadata
Metadata
Assignees
Labels
No labels