mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-05 11:47:13 +00:00

By just emitting them immediately, because it does happen in practice, when errors are downgraded to delayed bugs. We already had one case in `lint.rs` where we handled this at the callsite. This commit changes things so it's handled within `stash_diagnostic` instead, because #121812 identified a second case, and it's possible there are more. Fixes #121812.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.