|
| 1 | +error[E0282]: type annotations needed |
| 2 | + --> $DIR/suggest-fully-qualified-path-with-appropriate-params.rs:20:11 |
| 3 | + | |
| 4 | +LL | thing.method(); |
| 5 | + | ------^^^^^^-- |
| 6 | + | | | |
| 7 | + | | cannot infer type for type parameter `T` declared on the trait `Method` |
| 8 | + | this method call resolves to `T` |
| 9 | + |
| 10 | +error[E0283]: type annotations needed |
| 11 | + --> $DIR/suggest-fully-qualified-path-with-appropriate-params.rs:20:11 |
| 12 | + | |
| 13 | +LL | thing.method(); |
| 14 | + | ------^^^^^^-- |
| 15 | + | | | |
| 16 | + | | cannot infer type for type parameter `T` declared on the trait `Method` |
| 17 | + | this method call resolves to `T` |
| 18 | + | |
| 19 | +note: multiple `impl`s satisfying `Thing: Method<_>` found |
| 20 | + --> $DIR/suggest-fully-qualified-path-with-appropriate-params.rs:8:1 |
| 21 | + | |
| 22 | +LL | impl Method<i32> for Thing { |
| 23 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 24 | +... |
| 25 | +LL | impl Method<u32> for Thing { |
| 26 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 27 | +help: use the fully qualified path for the potential candidates |
| 28 | + | |
| 29 | +LL | <Thing as Method<i32>>::method(&thing); |
| 30 | + | ++++++++++++++++++++++++++++++++ ~ |
| 31 | +LL | <Thing as Method<u32>>::method(&thing); |
| 32 | + | ++++++++++++++++++++++++++++++++ ~ |
| 33 | + |
| 34 | +error[E0283]: type annotations needed |
| 35 | + --> $DIR/suggest-fully-qualified-path-with-appropriate-params.rs:23:11 |
| 36 | + | |
| 37 | +LL | thing.mut_method(); |
| 38 | + | ------^^^^^^^^^^-- |
| 39 | + | | | |
| 40 | + | | cannot infer type for type parameter `T` declared on the trait `Method` |
| 41 | + | this method call resolves to `T` |
| 42 | + | |
| 43 | +note: multiple `impl`s satisfying `Thing: Method<_>` found |
| 44 | + --> $DIR/suggest-fully-qualified-path-with-appropriate-params.rs:8:1 |
| 45 | + | |
| 46 | +LL | impl Method<i32> for Thing { |
| 47 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 48 | +... |
| 49 | +LL | impl Method<u32> for Thing { |
| 50 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 51 | +help: use the fully qualified path for the potential candidates |
| 52 | + | |
| 53 | +LL | <Thing as Method<i32>>::mut_method(&mut thing); |
| 54 | + | +++++++++++++++++++++++++++++++++++++++ ~ |
| 55 | +LL | <Thing as Method<u32>>::mut_method(&mut thing); |
| 56 | + | +++++++++++++++++++++++++++++++++++++++ ~ |
| 57 | + |
| 58 | +error: aborting due to 3 previous errors |
| 59 | + |
| 60 | +Some errors have detailed explanations: E0282, E0283. |
| 61 | +For more information about an error, try `rustc --explain E0282`. |
0 commit comments