diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2025-03-17 16:50:55 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2025-03-19 14:12:47 +0100 |
| commit | 6c865c1e14d5bd76b4ffe1e7ed2e60b3261d03a9 (patch) | |
| tree | 63af01dfa353f6dda1b2cd6d2b01ae92005addcf /compiler/rustc_resolve/src/lib.rs | |
| parent | 1370611c0ae0c7232bcd073e15046bae6b519e50 (diff) | |
| download | rust-6c865c1e14d5bd76b4ffe1e7ed2e60b3261d03a9.tar.gz rust-6c865c1e14d5bd76b4ffe1e7ed2e60b3261d03a9.zip | |
Allow builtin macros to be used more than once.
This removes E0773 "A builtin-macro was defined more than once."
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 447d5283e27..ff31af0025b 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -1010,12 +1010,6 @@ impl ExternPreludeEntry<'_> { } } -/// Used for better errors for E0773 -enum BuiltinMacroState { - NotYetSeen(SyntaxExtensionKind), - AlreadySeen(Span), -} - struct DeriveData { resolutions: Vec<DeriveResolution>, helper_attrs: Vec<(usize, Ident)>, @@ -1134,7 +1128,7 @@ pub struct Resolver<'ra, 'tcx> { used_extern_options: FxHashSet<Symbol>, macro_names: FxHashSet<Ident>, - builtin_macros: FxHashMap<Symbol, BuiltinMacroState>, + builtin_macros: FxHashMap<Symbol, SyntaxExtensionKind>, registered_tools: &'tcx RegisteredTools, macro_use_prelude: FxIndexMap<Symbol, NameBinding<'ra>>, macro_map: FxHashMap<DefId, MacroData>, |
