// run-pass trait Foo { extern fn borrow(&self); extern fn take(self: Box); } struct Bar; impl Foo for Bar { extern fn borrow(&self) {} extern fn take(self: Box) {} } fn main() { let foo: Box = Box::new(Bar); foo.borrow(); foo.take() }