You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program compiles and runs and will run the destructor twice:
class non_copyable {
let n: int;
new() { self.n = 0; }
drop { log(error, "running destructor"); }
}
fn main() {
let x = non_copyable();
let f = fn~() { assert x.n == 0; };
let g = copy f;
f(); g();
}