]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/objects-owned-object-owned-method.rs
2 // Test invoked `&self` methods on owned objects where the values
3 // closed over contain managed values. This implies that the boxes
4 // will have headers that must be skipped over.
6 #![feature(box_syntax)]
9 fn foo(self: Box
<Self>) -> usize;
16 impl FooTrait
for BarStruct
{
17 fn foo(self: Box
<BarStruct
>) -> usize {
23 let foo
= box BarStruct{ x: 22 }
as Box
<dyn FooTrait
>;
24 assert_eq
!(22, foo
.foo());