Files
rust/compiler/rustc_hir_analysis
Jonathan Brouwer 04c0c8ddde Rollup merge of #156565 - aerooneqq:delegation-self-type-ice, r=petrochenkov
delegation: emit error when self type is not specified and accessed

This PR adds error reporting when we create error self type if it was not specified. In most of the tests there were other errors, so this delayed bug was not triggered, but there are cases like `reuse Default::default;` (rust-lang/rust#156388) which does not emit other errors and those delayed bugs are triggered.

Part of rust-lang/rust#118212. Fixes rust-lang/rust#156388.

r? @petrochenkov
2026-05-15 20:11:47 +02:00
..

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