impl Drop for X {
fn drop(&mut self) {
- error2!("value: {}", self.x);
+ println!("value: {}", self.x);
}
}
}
fn main() {
- let x = X { x: ~"hello" };
+ let x = X { x: "hello".to_owned() };
let y = unwrap(x);
- error2!("contents: {}", y);
+ println!("contents: {}", y);
}