Change:
<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: This was also tried on with on Rust Playground, with the same error. <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</detailsWithout the fully qualified path, see commented code, the error is . <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Minimized: Looking into this. claim label D-incorrect

Discussion:
have_turbofish, } = args; let generics = tcx.generics_of(generics_def_id); <del> if let Some(argument_index) = generics </del> <ins> if let Some(mut argument_index) = generics </ins> .own_substs(substs) .iter() .position(|&arg| self.generic_arg_contains_target(arg)) { <ins> if generics.parent.is_none() && generics.has_self { argument_index += 1; } </ins> let substs = self.infcx.resolve_vars_if_possible(substs); let generic_args = &generics.own_substs_no_defaults(tcx, substs) [generics.own_counts().lifetimes..];

struct Struct; impl Ambiguous<One> for Struct {} <ins> //~^ NOTE multiple `impl`s satisfying `Struct: Ambiguous<_>` found </ins> impl Ambiguous<Two> for Struct {} fn main() { <Struct as Ambiguous<_>>::method(); //~^ ERROR type annotations needed <ins> //~| NOTE cannot infer type of the type parameter `A` </ins> //~| ERROR type annotations needed <ins> //~| NOTE infer type of the type parameter `A` </ins> }

error[E0282]: type annotations needed <del> --> $DIR/concrete-impl.rs:13:5 </del> <ins> --> $DIR/concrete-impl.rs:14:5 </ins> | LL |     <Struct as Ambiguous<_>>::method(); <del> |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `Self` declared on the trait `Ambiguous` </del> <ins> |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `A` declared on the trait `Ambiguous` </ins> error[E0283]: type annotations needed <del> --> $DIR/concrete-impl.rs:13:5 </del> <ins> --> $DIR/concrete-impl.rs:14:5 </ins> | LL |     <Struct as Ambiguous<_>>::method(); <del> |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `Self` declared on the trait `Ambiguous` </del> <ins> |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `A` declared on the trait `Ambiguous` </ins> | note: multiple `impl`s satisfying `Struct: Ambiguous<_>` found --> $DIR/concrete-impl.rs:9:1 | LL | impl Ambiguous<One> for Struct {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <ins> LL | </ins> LL | impl Ambiguous<Two> for Struct {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

<ins> // Test that we show the correct type parameter that couldn't be inferred and that we don't // end up stating nonsense like "type parameter `'a`" which we used to do. trait Trait<'a, T> { fn m(self); } impl<'a, A> Trait<'a, A> for () { fn m(self) {} } fn qualified() { <() as Trait<'static, _>>::m(()); //~^ ERROR type annotations needed //~| NOTE cannot infer type of the type parameter `T` } fn unqualified() { Trait::<'static, _>::m(()); //~^ ERROR type annotations needed //~| NOTE cannot infer type of the type parameter `T` } fn main() {} </ins>

<ins> error[E0282]: type annotations needed --> $DIR/issue-109905.rs:13:5 | LL |     <() as Trait<'static, _>>::m(()); |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the trait `Trait` error[E0282]: type annotations needed --> $DIR/issue-109905.rs:20:5 | LL |     Trait::<'static, _>::m(()); |     ^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the trait `Trait` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0282`. </ins>