]> git.proxmox.com Git - rustc.git/blame - src/test/run-pass/issues/issue-51907.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / run-pass / issues / issue-51907.rs
CommitLineData
b7449926 1// run-pass
8faf50e0
XL
2trait Foo {
3 extern fn borrow(&self);
4 extern fn take(self: Box<Self>);
223e47cc 5}
8faf50e0
XL
6
7struct Bar;
8impl Foo for Bar {
9 extern fn borrow(&self) {}
10 extern fn take(self: Box<Self>) {}
11}
12
a7813a04 13fn main() {
8faf50e0
XL
14 let foo: Box<dyn Foo> = Box::new(Bar);
15 foo.borrow();
16 foo.take()
54a0048b 17}