@@ -19,7 +19,7 @@ pub use rustc_hir::def::{Namespace, PerNS};
1919
2020use Determinacy :: * ;
2121
22- use rustc_arena:: TypedArena ;
22+ use rustc_arena:: { DroplessArena , TypedArena } ;
2323use rustc_ast:: node_id:: NodeMap ;
2424use rustc_ast:: unwrap_or;
2525use rustc_ast:: visit:: { self , Visitor } ;
@@ -1035,12 +1035,10 @@ pub struct Resolver<'a> {
10351035pub struct ResolverArenas < ' a > {
10361036 modules : TypedArena < ModuleData < ' a > > ,
10371037 local_modules : RefCell < Vec < Module < ' a > > > ,
1038- name_bindings : TypedArena < NameBinding < ' a > > ,
10391038 imports : TypedArena < Import < ' a > > ,
10401039 name_resolutions : TypedArena < RefCell < NameResolution < ' a > > > ,
1041- macro_rules_bindings : TypedArena < MacroRulesBinding < ' a > > ,
10421040 ast_paths : TypedArena < ast:: Path > ,
1043- pattern_spans : TypedArena < Span > ,
1041+ dropless : DroplessArena ,
10441042}
10451043
10461044impl < ' a > ResolverArenas < ' a > {
@@ -1055,7 +1053,7 @@ impl<'a> ResolverArenas<'a> {
10551053 self . local_modules . borrow ( )
10561054 }
10571055 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)
10591057 }
10601058 fn alloc_import ( & ' a self , import : Import < ' a > ) -> & ' a Import < ' _ > {
10611059 self . imports . alloc ( import)
@@ -1067,13 +1065,13 @@ impl<'a> ResolverArenas<'a> {
10671065 & ' a self ,
10681066 binding : MacroRulesBinding < ' a > ,
10691067 ) -> & ' a MacroRulesBinding < ' a > {
1070- self . macro_rules_bindings . alloc ( binding)
1068+ self . dropless . alloc ( binding)
10711069 }
10721070 fn alloc_ast_paths ( & ' a self , paths : & [ ast:: Path ] ) -> & ' a [ ast:: Path ] {
10731071 self . ast_paths . alloc_from_iter ( paths. iter ( ) . cloned ( ) )
10741072 }
10751073 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)
10771075 }
10781076}
10791077
0 commit comments