about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/lib.rs
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2025-03-17 16:50:55 +0100
committerMara Bos <m-ou.se@m-ou.se>2025-03-19 14:12:47 +0100
commit6c865c1e14d5bd76b4ffe1e7ed2e60b3261d03a9 (patch)
tree63af01dfa353f6dda1b2cd6d2b01ae92005addcf /compiler/rustc_resolve/src/lib.rs
parent1370611c0ae0c7232bcd073e15046bae6b519e50 (diff)
downloadrust-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.rs8
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>,