diff options
Diffstat (limited to 'tests/ui/specialization/issue-50452-fail.rs')
-rw-r--r-- | tests/ui/specialization/issue-50452-fail.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/specialization/issue-50452-fail.rs b/tests/ui/specialization/issue-50452-fail.rs new file mode 100644 index 000000000..fe21e9b6e --- /dev/null +++ b/tests/ui/specialization/issue-50452-fail.rs @@ -0,0 +1,21 @@ +#![feature(specialization)] +//~^ WARN the feature `specialization` is incomplete + +pub trait Foo { + fn foo(); +} + +impl Foo for i32 {} +impl Foo for i64 { + fn foo() {} + //~^ERROR `foo` specializes an item from a parent `impl` +} +impl<T> Foo for T { + fn foo() {} +} + +fn main() { + i32::foo(); + i64::foo(); + u8::foo(); +} |