]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/negative-impls/explicitly-unimplemented-error-message.rs
1 // This tests issue #79683: note in the error message that the trait is
2 // explicitly unimplemented instead of suggesting to implement it.
4 #![feature(negative_impls)]
7 //~^ NOTE method `clone` not found for this
8 //~^^ NOTE method `foo` not found for this
10 impl !Clone
for Qux {}
21 //~^^^ NOTE `Foo` defines an item `foo`, perhaps you need to implement it
29 impl !FooBar
for Qux {}
31 impl !FooBar
for u32 {}
35 //~^ ERROR no method named `clone` found for struct `Qux`
36 //~| NOTE method not found in `Qux`
37 //~| NOTE `Clone` defines an item `clone`, but is explicitly unimplemented
40 //~^ ERROR no method named `bar` found for type `u32`
41 //~| NOTE method not found in `u32`
42 //~| NOTE `Bar` defines an item `bar`, but is explicitly unimplemented
45 //~^ ERROR no method named `foo` found for struct `Qux`
46 //~| NOTE method not found in `Qux`
47 //~| NOTE the following traits define an item `foo`, but are explicitly unimplemented
50 //~^ ERROR no method named `foo` found for type `u32`
51 //~| NOTE method not found in `u32`
52 //~| NOTE `FooBar` defines an item `foo`, but is explicitly unimplemented