diff options
Diffstat (limited to 'src/test/ui/extern/extern-types-trait-impl.rs')
-rw-r--r-- | src/test/ui/extern/extern-types-trait-impl.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/test/ui/extern/extern-types-trait-impl.rs b/src/test/ui/extern/extern-types-trait-impl.rs deleted file mode 100644 index 656101ed5..000000000 --- a/src/test/ui/extern/extern-types-trait-impl.rs +++ /dev/null @@ -1,26 +0,0 @@ -// run-pass -#![allow(dead_code)] -// Test that traits can be implemented for extern types. -#![feature(extern_types)] - -extern "C" { - type A; -} - -trait Foo { - fn foo(&self) {} -} - -impl Foo for A { - fn foo(&self) {} -} - -fn assert_foo<T: ?Sized + Foo>() {} - -fn use_foo<T: ?Sized + Foo>(x: &dyn Foo) { - x.foo(); -} - -fn main() { - assert_foo::<A>(); -} |