diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/associated-types/associated-types-in-ambiguous-context.stderr | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr b/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr new file mode 100644 index 000000000..00856b55d --- /dev/null +++ b/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr @@ -0,0 +1,48 @@ +error[E0223]: ambiguous associated type + --> $DIR/associated-types-in-ambiguous-context.rs:6:36 + | +LL | fn get<T:Get,U:Get>(x: T, y: U) -> Get::Value {} + | ^^^^^^^^^^ + | +help: if there were a type named `Example` that implemented `Get`, you could use the fully-qualified path + | +LL | fn get<T:Get,U:Get>(x: T, y: U) -> <Example as Get>::Value {} + | ~~~~~~~~~~~~~~~~~~~~~~~ + +error[E0223]: ambiguous associated type + --> $DIR/associated-types-in-ambiguous-context.rs:20:17 + | +LL | trait Foo where Foo::Assoc: Bar { + | ^^^^^^^^^^ help: use the fully-qualified path: `<Self as Foo>::Assoc` + +error[E0223]: ambiguous associated type + --> $DIR/associated-types-in-ambiguous-context.rs:25:10 + | +LL | type X = std::ops::Deref::Target; + | ^^^^^^^^^^^^^^^^^^^^^^^ + | +help: if there were a type named `Example` that implemented `Deref`, you could use the fully-qualified path + | +LL | type X = <Example as Deref>::Target; + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + +error[E0223]: ambiguous associated type + --> $DIR/associated-types-in-ambiguous-context.rs:11:23 + | +LL | fn grab(&self) -> Grab::Value; + | ^^^^^^^^^^^ help: use the fully-qualified path: `<Self as Grab>::Value` + +error[E0223]: ambiguous associated type + --> $DIR/associated-types-in-ambiguous-context.rs:14:22 + | +LL | fn get(&self) -> Get::Value; + | ^^^^^^^^^^ + | +help: if there were a type named `Example` that implemented `Get`, you could use the fully-qualified path + | +LL | fn get(&self) -> <Example as Get>::Value; + | ~~~~~~~~~~~~~~~~~~~~~~~ + +error: aborting due to 5 previous errors + +For more information about this error, try `rustc --explain E0223`. |