diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/traits/not-suggest-non-existing-fully-qualified-path.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/traits/not-suggest-non-existing-fully-qualified-path.rs b/src/test/ui/traits/not-suggest-non-existing-fully-qualified-path.rs new file mode 100644 index 000000000..538e74ee1 --- /dev/null +++ b/src/test/ui/traits/not-suggest-non-existing-fully-qualified-path.rs @@ -0,0 +1,24 @@ +struct A<T>(T); +struct B; + +trait I<T> {} +impl I<i32> for B {} +impl I<u32> for B {} + +trait V<U> { + fn method(self) -> U; +} + +impl<T, U> V<U> for A<T> +where + T: I<U>, +{ + fn method(self) -> U { unimplemented!() } +} + +fn main() { + let a = A(B); + a.method(); + //~^ ERROR type annotations needed + //~| ERROR type annotations needed +} |