File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
compiler/rustc_resolve/src Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1025,6 +1025,21 @@ impl MacroData {
1025
1025
}
1026
1026
}
1027
1027
1028
+ pub ( crate ) type Macro < ' ra > = Interned < ' ra , MacroData > ;
1029
+
1030
+ // Allows us to use Interned without actually enforcing (via Hash/PartialEq/...) uniqueness of the
1031
+ // contained data.
1032
+ // FIXME: We may wish to actually have at least debug-level assertions that Interned's guarantees
1033
+ // are upheld.
1034
+ impl std:: hash:: Hash for MacroData {
1035
+ fn hash < H > ( & self , _: & mut H )
1036
+ where
1037
+ H : std:: hash:: Hasher ,
1038
+ {
1039
+ unreachable ! ( )
1040
+ }
1041
+ }
1042
+
1028
1043
/// The main resolver class.
1029
1044
///
1030
1045
/// This is the visitor that walks the whole crate.
@@ -1241,6 +1256,7 @@ pub struct ResolverArenas<'ra> {
1241
1256
imports : TypedArena < ImportData < ' ra > > ,
1242
1257
name_resolutions : TypedArena < RefCell < NameResolution < ' ra > > > ,
1243
1258
ast_paths : TypedArena < ast:: Path > ,
1259
+ macros : TypedArena < MacroData > ,
1244
1260
dropless : DroplessArena ,
1245
1261
}
1246
1262
You can’t perform that action at this time.
0 commit comments