Rollup merge of #118533 - chenyukang:yukang-fix-118455, r=petrochenkov

Suppress unhelpful diagnostics for unresolved top level attributes

Fixes #118455, unresolved top level attribute error didn't imported prelude and already have emitted an error, report builtin macro and attributes error by the way, so `check_invalid_crate_level_attr` in can ignore them.

Also fixes #89566, fixes #67107.

r? `@petrochenkov`
This commit is contained in:
Guillaume Gomez 2024-01-30 16:57:46 +01:00 committed by GitHub
commit ee2e9e1eda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 100 additions and 202 deletions

View file

@ -514,6 +514,7 @@ pub enum StashKey {
MaybeForgetReturn,
/// Query cycle detected, stashing in favor of a better error.
Cycle,
UndeterminedMacroResolution,
}
fn default_track_diagnostic(diag: Diagnostic, f: &mut dyn FnMut(Diagnostic)) {