1
Fork 0
rust/compiler/rustc_resolve
Esteban Küber a23566a57e Provide more context on resolve error caused from incorrect RTN
When encountering a resolve E0575 error for an associated method (when a type was expected), see if it could have been an intended return type notation bound.

```
error[E0575]: expected associated type, found associated function `Trait::method`
  --> $DIR/bad-inputs-and-output.rs:31:36
   |
LL | fn foo_qualified<T: Trait>() where <T as Trait>::method(i32): Send {}
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
   |
help: you might have meant to use the return type notation syntax
   |
LL - fn foo_qualified<T: Trait>() where <T as Trait>::method(i32): Send {}
LL + fn foo_qualified<T: Trait>() where T::method(..): Send {}
   |
```
2025-03-03 18:23:49 +00:00
..
src Provide more context on resolve error caused from incorrect RTN 2025-03-03 18:23:49 +00:00
Cargo.toml Upgrade the compiler to edition 2024 2025-02-22 00:01:48 +00:00
messages.ftl Introduce feature(generic_const_parameter_types) 2025-02-28 20:43:15 +00:00