Unnamed repository; edit this file 'description' to name the repository.
Rollup merge of #157264 - Dnreikronos:fix/method-suggest-trait-extra-generics-ice, r=chenyukang
diagnostics: Fix ICE building a trait ref in method suggestions Fixes rust-lang/rust#157189 When a method call doesn't resolve, the no-method-found diagnostic probes every trait for one with a same-named method and builds a trait ref for it to spot trait items duplicated across crate versions. It only ever passed the receiver as the single argument, which works only when the trait's one generic is `Self`. Call `.borrow()` on something and the probe finds `Borrow`, whose extra `Borrowed` parameter leaves the args out of step with the trait's generics, so `debug_assert_args_compatible` fires. Same crash when the receiver type isn't known and there are zero args. Now the args come from `GenericArgs::for_item`: the receiver fills `Self` when we have it, fresh inference variables cover the rest.
Jacob Pratt 6 weeks ago
parent 2970535 · parent d62283f · commit ee0143c
0 files changed, 0 insertions, 0 deletions