rust/compiler/rustc_hir_analysis
Stuart Cook 5913c5248b
Rollup merge of #139124 - xtexx:gh-139082, r=compiler-errors
compiler: report error when trait object type param reference self

Fixes #139082.

Emits an error when `Self` is found in the projection bounds of a trait
object. In type aliases, `Self` has no meaning, so `type A = &'static
dyn B` where `trait B = Fn() -> Self` will expands to `type A = &'static
Fn() -> Self` which is illegal, causing the region solver to bail out
when hitting the uninferred Self.

r? ````@compiler-errors```` ````@fee1-dead````
2025-04-08 20:55:04 +10:00
..
src Rollup merge of #139124 - xtexx:gh-139082, r=compiler-errors 2025-04-08 20:55:04 +10:00
Cargo.toml Stop relying on rustc_type_ir in non-type-system crates 2025-03-15 06:42:48 +00:00
messages.ftl compiler: report error when trait object type param reference self 2025-04-03 17:35:51 +08:00
README.md

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