rust/compiler/rustc_hir_analysis
Stuart Cook 2d43a8b20d
Rollup merge of #139200 - xizheyin:issue-139174, r=compiler-errors
Skip suggest impl or dyn when poly trait is not a real trait

Fixes #139174
When `poly_trait_ref` is not a real trait, we should stop suggesting `impl` and `dyn` to avoid false positives. 3 cases were added to the ui test.
0b45675cfc/compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs (L88-L93)

In the first commit, I submitted the test and passed it. In the second commit, I modified the code and we can see the changes in the test.

r? compiler
2025-04-02 13:10:40 +11:00
..
src Rollup merge of #139200 - xizheyin:issue-139174, r=compiler-errors 2025-04-02 13:10:40 +11:00
Cargo.toml Stop relying on rustc_type_ir in non-type-system crates 2025-03-15 06:42:48 +00:00
messages.ftl Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.