mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-17 06:06:37 +00:00
Delay span bug when `Self` kw resolves to `DefKind::{Mod,Trait}`
Catch the case where `kw::Self` is recovered in the parser and causes us to subsequently resolve `&self`'s implicit type to something that's not a type.
This check could be made more accurate, though I'm not sure how hard we have to try here.
Fixes #123988
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.