summaryrefslogtreecommitdiffstats
path: root/src/test/ui/self/objects-owned-object-owned-method.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/self/objects-owned-object-owned-method.rs')
-rw-r--r--src/test/ui/self/objects-owned-object-owned-method.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/test/ui/self/objects-owned-object-owned-method.rs b/src/test/ui/self/objects-owned-object-owned-method.rs
deleted file mode 100644
index 15677a518..000000000
--- a/src/test/ui/self/objects-owned-object-owned-method.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// run-pass
-// Test invoked `&self` methods on owned objects where the values
-// closed over contain managed values. This implies that the boxes
-// will have headers that must be skipped over.
-
-trait FooTrait {
- fn foo(self: Box<Self>) -> usize;
-}
-
-struct BarStruct {
- x: usize
-}
-
-impl FooTrait for BarStruct {
- fn foo(self: Box<BarStruct>) -> usize {
- self.x
- }
-}
-
-pub fn main() {
- let foo = Box::new(BarStruct{ x: 22 }) as Box<dyn FooTrait>;
- assert_eq!(22, foo.foo());
-}