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. --code from <!-- 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. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
searched toolchains through Regression in probably cc
I can look into this claim

Discussion:
} // FIXME: currently we never try to compose autoderefs // and ReifyFnPointer/UnsafeFnPointer, but we could. <del> _ => bug!( "while adjusting {:?}, can't compose {:?} and {:?}", expr, entry.get(), adj </del> <ins> _ => self.tcx.sess.delay_span_bug( expr.span, &format!( "while adjusting {:?}, can't compose {:?} and {:?}", expr, entry.get(), adj ), </ins> ), }; *entry.get_mut() = adj;

// This is more complicated than just checking type equality, as arguments could be coerced // This version writes those types back so further type checking uses the narrowed types let demand_compatible = |idx, final_arg_types: &mut Vec<Option<(Ty<'tcx>, Ty<'tcx>)>>| { <del> // Do not check argument compatibility if the number of args do not match if arg_count_error.is_some() { return; } </del> let formal_input_ty: Ty<'tcx> = formal_input_tys[idx]; let expected_input_ty: Ty<'tcx> = expected_input_tys[idx]; let provided_arg = &provided_args[idx];

//~^ ERROR this function takes 1 argument but 0 arguments were supplied let ans = s("burma", "shave"); //~^ ERROR this function takes 1 argument but 2 arguments were supplied <ins> //~| ERROR mismatched types </ins> }

LL |     extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; |                           ^^^^^^^^ <ins> error[E0308]: mismatched types --> $DIR/overloaded-calls-bad.rs:31:17 | LL |     let ans = s("burma", "shave"); |                 ^^^^^^^ expected `isize`, found `&str` </ins> error[E0057]: this function takes 1 argument but 2 arguments were supplied --> $DIR/overloaded-calls-bad.rs:31:15 |

LL |     extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; |                           ^^^^^^^^ <del> error: aborting due to 3 previous errors </del> <ins> error: aborting due to 4 previous errors </ins> Some errors have detailed explanations: E0057, E0308. For more information about an error, try `rustc --explain E0057`.

<ins> struct Process; pub type Group = (Vec<String>, Vec<Process>); fn test(process: &Process, groups: Vec<Group>) -> Vec<Group> { let new_group = vec![String::new()]; if groups.capacity() == 0 { groups.push(new_group, vec![process]); //~^ ERROR this function takes 1 argument but 2 arguments were supplied return groups; } todo!() } fn main() {} </ins>

<ins> error[E0061]: this function takes 1 argument but 2 arguments were supplied --> $DIR/wrong_argument_ice-3.rs:9:16 | LL |         groups.push(new_group, vec![process]); |                ^^^^ ---------  ------------- supplied 2 arguments |                | |                expected 1 argument | note: associated function defined here --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL | LL |     pub fn push(&mut self, value: T) { |            ^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0061`. </ins>