diff options
Diffstat (limited to 'tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs')
-rw-r--r-- | tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs b/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs new file mode 100644 index 000000000..62c249e58 --- /dev/null +++ b/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs @@ -0,0 +1,18 @@ +// aux-build:extern-crate.rs +extern crate extern_crate; + +impl extern_crate::StructWithAttr {} +//~^ ERROR cannot define inherent `impl` for a type outside of the crate + +impl extern_crate::StructNoAttr {} +//~^ ERROR cannot define inherent `impl` for a type outside of the crate + +impl extern_crate::EnumWithAttr {} +//~^ ERROR cannot define inherent `impl` for a type outside of the crate + +impl extern_crate::EnumNoAttr {} +//~^ ERROR cannot define inherent `impl` for a type outside of the crate + +impl f32 {} //~ ERROR cannot define inherent `impl` for primitive types + +fn main() {} |