mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-04 03:07:25 +00:00

Emit a nicer error on `impl Self {` currently it emits a "cycle detected error" but this PR makes it emit a more user friendly error specifically saying that `Self` is disallowed in that position. this is a pretty hacky fix so i dont expect this to be merged (I basically only made this PR because i wanted to see if CI passes) r? ``@compiler-errors``
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.