Closed
Description
struct Dummy {
x: int
}
impl Dummy {
fn new(x: int) -> Dummy {
Dummy { x: x }
}
}
impl Drop for Dummy {
fn drop(&self) {
error!("Destructor %d", self.x);
}
}
fn welp<T>(a: ~T) -> T {
let ~x = a;
x
}
fn main() {
let o = ~Dummy::new(5);
welp(o);
}
(edit: a similar problem appears for let a@b = c
; see comment below.)