diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed b/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed new file mode 100644 index 000000000..23f715200 --- /dev/null +++ b/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed @@ -0,0 +1,14 @@ +// run-rustfix +trait Trait<A> {} + +trait Assoc { + type Ty; +} + +impl<A> Assoc for dyn Trait<A> { + type Ty = i32; +} + +fn main() { + let _x: <dyn Trait<i32> as Assoc>::Ty; //~ ERROR ambiguous associated type +} |