@@ -19,7 +19,7 @@ pub use rustc_hir::def::{Namespace, PerNS};
19
19
20
20
use Determinacy :: * ;
21
21
22
- use rustc_arena:: TypedArena ;
22
+ use rustc_arena:: { DroplessArena , TypedArena } ;
23
23
use rustc_ast:: node_id:: NodeMap ;
24
24
use rustc_ast:: unwrap_or;
25
25
use rustc_ast:: visit:: { self , Visitor } ;
@@ -1035,12 +1035,10 @@ pub struct Resolver<'a> {
1035
1035
pub struct ResolverArenas < ' a > {
1036
1036
modules : TypedArena < ModuleData < ' a > > ,
1037
1037
local_modules : RefCell < Vec < Module < ' a > > > ,
1038
- name_bindings : TypedArena < NameBinding < ' a > > ,
1039
1038
imports : TypedArena < Import < ' a > > ,
1040
1039
name_resolutions : TypedArena < RefCell < NameResolution < ' a > > > ,
1041
- macro_rules_bindings : TypedArena < MacroRulesBinding < ' a > > ,
1042
1040
ast_paths : TypedArena < ast:: Path > ,
1043
- pattern_spans : TypedArena < Span > ,
1041
+ dropless : DroplessArena ,
1044
1042
}
1045
1043
1046
1044
impl < ' a > ResolverArenas < ' a > {
@@ -1055,7 +1053,7 @@ impl<'a> ResolverArenas<'a> {
1055
1053
self . local_modules . borrow ( )
1056
1054
}
1057
1055
fn alloc_name_binding ( & ' a self , name_binding : NameBinding < ' a > ) -> & ' a NameBinding < ' a > {
1058
- self . name_bindings . alloc ( name_binding)
1056
+ self . dropless . alloc ( name_binding)
1059
1057
}
1060
1058
fn alloc_import ( & ' a self , import : Import < ' a > ) -> & ' a Import < ' _ > {
1061
1059
self . imports . alloc ( import)
@@ -1067,13 +1065,13 @@ impl<'a> ResolverArenas<'a> {
1067
1065
& ' a self ,
1068
1066
binding : MacroRulesBinding < ' a > ,
1069
1067
) -> & ' a MacroRulesBinding < ' a > {
1070
- self . macro_rules_bindings . alloc ( binding)
1068
+ self . dropless . alloc ( binding)
1071
1069
}
1072
1070
fn alloc_ast_paths ( & ' a self , paths : & [ ast:: Path ] ) -> & ' a [ ast:: Path ] {
1073
1071
self . ast_paths . alloc_from_iter ( paths. iter ( ) . cloned ( ) )
1074
1072
}
1075
1073
fn alloc_pattern_spans ( & ' a self , spans : impl Iterator < Item = Span > ) -> & ' a [ Span ] {
1076
- self . pattern_spans . alloc_from_iter ( spans)
1074
+ self . dropless . alloc_from_iter ( spans)
1077
1075
}
1078
1076
}
1079
1077
0 commit comments