diff options
Diffstat (limited to 'src/test/ui/generics/generic-object.rs')
-rw-r--r-- | src/test/ui/generics/generic-object.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/test/ui/generics/generic-object.rs b/src/test/ui/generics/generic-object.rs deleted file mode 100644 index 851424a11..000000000 --- a/src/test/ui/generics/generic-object.rs +++ /dev/null @@ -1,21 +0,0 @@ -// run-pass - -trait Foo<T> { - fn get(&self) -> T; -} - -struct S { - x: isize -} - -impl Foo<isize> for S { - fn get(&self) -> isize { - self.x - } -} - -pub fn main() { - let x = Box::new(S { x: 1 }); - let y = x as Box<dyn Foo<isize>>; - assert_eq!(y.get(), 1); -} |