summary refs log tree commit diff
path: root/src/test/ui/issues/issue-51907.rs
blob: 3691fe19117746649fa1fa33fdf88c16a8e207f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-pass
trait Foo {
    extern fn borrow(&self);
    extern fn take(self: Box<Self>);
}

struct Bar;
impl Foo for Bar {
    extern fn borrow(&self) {}
    extern fn take(self: Box<Self>) {}
}

fn main() {
    let foo: Box<dyn Foo> = Box::new(Bar);
    foo.borrow();
    foo.take()
}