Change:
The spans for this error should point to the generic arguments, not the entire path. See <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --This issue has been assigned to via . <!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOT_END --
claim

Discussion:
/// Report error if there is an explicit type parameter when using `impl Trait`. fn check_impl_trait( tcx: TyCtxt<'_>, <del> span: Span, </del> seg: &hir::PathSegment, generics: &ty::Generics, ) -> bool {

}); if explicit && impl_trait { <ins> let spans = seg.generic_args().args .iter() .filter_map(|arg| match arg { GenericArg::Type(_) => Some(arg.span()), _ => None }) .collect::<Vec<_>>(); </ins> let mut err = struct_span_err! { tcx.sess, <del> span, </del> <ins> spans.clone(), </ins> E0632, "cannot provide explicit generic arguments when `impl Trait` is  <del> used in argument position" </del> <ins> used in argument position" </ins> }; <ins> for span in spans { err.span_label(span, "explicit generic argument not allowed"); } </ins> err.emit(); }

let empty_args = P(hir::GenericArgs { args: HirVec::new(), bindings: HirVec::new(), parenthesized: false, }); <del> let suppress_mismatch = Self::check_impl_trait(tcx, span, seg, &def); </del> <ins> let suppress_mismatch = Self::check_impl_trait(tcx, seg, &def); </ins> Self::check_generic_arg_count( tcx, span,

error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position <del> --> $DIR/universal-issue-48703.rs:8:5 </del> <ins> --> $DIR/universal-issue-48703.rs:8:11 </ins> | LL |     foo::<String>('a'); <del> |     ^^^^^^^^^^^^^ </del> <ins> |           ^^^^^^ explicit generic argument not allowed </ins> error: aborting due to previous error

error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position <del> --> $DIR/universal-turbofish-in-method-issue-50950.rs:14:9 </del> <ins> --> $DIR/universal-turbofish-in-method-issue-50950.rs:14:24 </ins> | LL |     evt.handle_event::<TestEvent, fn(TestEvent)>(|_evt| { <del> |         ^^^^^^^^^^^^ </del> <ins> |                        ^^^^^^^^^  ^^^^^^^^^^^^^ explicit generic argument not allowed |                        | |                        explicit generic argument not allowed </ins> error: aborting due to previous error

error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position <del> --> $DIR/synthetic-param.rs:20:5 </del> <ins> --> $DIR/synthetic-param.rs:20:12 </ins> | LL |     func::<u8>(42); <del> |     ^^^^^^^^^^ </del> <ins> |            ^^ explicit generic argument not allowed </ins> error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position <del> --> $DIR/synthetic-param.rs:23:5 </del> <ins> --> $DIR/synthetic-param.rs:23:17 </ins> | LL |     Foo::func::<u8>(42); <del> |     ^^^^^^^^^^^^^^^ </del> <ins> |                 ^^ explicit generic argument not allowed </ins> error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position <del> --> $DIR/synthetic-param.rs:26:5 </del> <ins> --> $DIR/synthetic-param.rs:26:23 </ins> | LL |     Bar::<i8>::func::<u8>(42); <del> |     ^^^^^^^^^^^^^^^^^^^^^ </del> <ins> |                       ^^ explicit generic argument not allowed </ins> error: aborting due to 3 previous errors