Commit Graph

6 Commits

Author SHA1 Message Date
janwi_mac d02b4c8e77 Improve suggestions for unconstrained parameters in impl blocks
When an unconstrained type or lifetime parameter is detected in an
`impl`, provide more specific help based on its usage:
- If the parameter is entirely unused, suggest removing it.
- If it is used in the `impl` body but not the `Self` type, suggest
  including it in the `Self` type and the struct definition.

This also adds a comprehensive UI test for these cases.
2026-05-09 17:50:35 +12:00
Matthias Krüger 02434fe718 Rollup merge of #148678 - xonx4l:EO412_replacement_with_EO425, r=Kivooeo
Merge E0412 into E0425

This PR merge E0412 into E0425  as both mean the same thing to users.

This fixes https://github.com/rust-lang/rust/issues/148558.
2025-12-02 22:02:30 +01:00
xonx4l 4b000cfacd Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
Adwin White b111aed11f fudge infer vars in cause code intentionally 2025-12-01 12:40:49 +08:00
Michael Goulet 995eeeb54c Don't call predicates_of on a dummy obligation cause's body id 2025-07-05 17:47:28 +00:00
Michael Goulet d8dc31fd3d Consider param-env candidates even if they have errors 2024-10-24 01:48:44 +00:00