Change:
This is ICE since 1.50.0, error -ICE. Originally posted by in <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Bisected: searched nightlies: from nightly-2020-01-01 to nightly-2021-03-17 regressed nightly: nightly-2020-11-18 searched commits: from to regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.0</summaryHost triple: x86_64-unknown-linux-gnu Reproduce with: </details
Thanks for bisecting, I believe is the cause.
Assigning and removing as in the prioritization working group. label: +P-medium -I-prioritize
claim

Discussion:
// another. This is an error. However, if we already know that // the arguments don't match up with the parameters, we won't issue // an additional error, as the user already knows what's wrong. <del> if arg_count.correct.is_ok() && arg_count.explicit_late_bound == ExplicitLateBound::No { </del> <ins> if arg_count.correct.is_ok() { </ins> // We're going to iterate over the parameters to sort them out, and // show that order to the user as a possible order for the parameters let mut param_types_present = defs

} if silent { <del> return false; </del> <ins> return true; </ins> } if provided > expected_max {

let mut infer_args_for_err = FxHashSet::default(); <ins> let mut explicit_late_bound = ExplicitLateBound::No; </ins> for &PathSeg(def_id, index) in &path_segs { let seg = &segments[index]; let generics = tcx.generics_of(def_id);

// parameter internally, but we don't allow users to specify the // parameter's value explicitly, so we have to do some error- // checking here. <del> if let GenericArgCountResult { correct: Err(GenericArgCountMismatch { reported: Some(_), .. }), .. } = <dyn AstConv<'_>>::check_generic_arg_count_for_call( </del> <ins> let arg_count = <dyn AstConv<'_>>::check_generic_arg_count_for_call( </ins> tcx, span, def_id, &generics, seg, IsMethodCall::No, <del> ) { </del> <ins> ); if let ExplicitLateBound::Yes = arg_count.explicit_late_bound { explicit_late_bound = ExplicitLateBound::Yes; } if let Err(GenericArgCountMismatch { reported: Some(_), .. }) = arg_count.correct { </ins> infer_args_for_err.insert(index); self.set_tainted_by_errors(); // See issue #53251. }

let ty = tcx.type_of(def_id); let arg_count = GenericArgCountResult { <del> explicit_late_bound: ExplicitLateBound::No, </del> <ins> explicit_late_bound, </ins> correct: if infer_args_for_err.is_empty() { Ok(()) } else {

<ins> // regression test for #83466- tests that generic arg mismatch errors between // consts and types are not supressed when there are explicit late bound lifetimes struct S; impl S { fn func<'a, U>(self) -> U { todo!() } } fn dont_crash<'a, U>() { S.func::<'a, 10_u32>() //~^ WARNING cannot specify lifetime arguments explicitly if late bound lifetime parameters are present //~^^ WARNING this was previously accepted by //~^^^ ERROR constant provided when a type was expected [E0747] } fn main() {} </ins>

<ins> warning: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present --> $DIR/issue-83466.rs:11:14 | LL |     fn func<'a, U>(self) -> U { |             -- the late bound lifetime parameter is introduced here ... LL |     S.func::<'a, 10_u32>() |              ^^ | = note: `#[warn(late_bound_lifetime_arguments)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42868 <https://github.com/rust-lang/rust/issues/42868> error[E0747]: constant provided when a type was expected --> $DIR/issue-83466.rs:11:18 | LL |     S.func::<'a, 10_u32>() |                  ^^^^^^ error: aborting due to previous error; 1 warning emitted For more information about this error, try `rustc --explain E0747`. </ins>