]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
move an `assert!` to the right place
[rust.git] / src / test / ui / methods / method-ambig-one-trait-unknown-int-type.stderr
index 66e7ada3ac5fd9d43b20f7aba0cd4eb53d5b61fb..e0f8a5447b081b884cf4640562efe0cd8ff1a4db 100644 (file)
@@ -13,7 +13,7 @@ error[E0283]: type annotations needed
   --> $DIR/method-ambig-one-trait-unknown-int-type.rs:26:7
    |
 LL |     x.foo();
-   |       ^^^ cannot infer type for struct `Vec<_>`
+   |       ^^^
    |
 note: multiple `impl`s satisfying `Vec<_>: Foo` found
   --> $DIR/method-ambig-one-trait-unknown-int-type.rs:9:1
@@ -23,6 +23,10 @@ LL | impl Foo for Vec<usize> {
 ...
 LL | impl Foo for Vec<isize> {
    | ^^^^^^^^^^^^^^^^^^^^^^^
+help: try using a fully qualified path to specify the expected types
+   |
+LL |     <Vec<T> as Foo>::foo(&x);
+   |     ++++++++++++++++++++++ ~
 
 error[E0308]: mismatched types
   --> $DIR/method-ambig-one-trait-unknown-int-type.rs:33:20