File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
compiler/rustc_typeck/src/variance Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 44//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/variance.html
55
66use hir:: Node ;
7- use rustc_arena:: TypedArena ;
7+ use rustc_arena:: DroplessArena ;
88use rustc_hir as hir;
99use rustc_hir:: def_id:: { CrateNum , DefId , LOCAL_CRATE } ;
1010use rustc_middle:: ty:: query:: Providers ;
@@ -32,8 +32,8 @@ pub fn provide(providers: &mut Providers) {
3232
3333fn crate_variances ( tcx : TyCtxt < ' _ > , crate_num : CrateNum ) -> CrateVariancesMap < ' _ > {
3434 assert_eq ! ( crate_num, LOCAL_CRATE ) ;
35- let mut arena = TypedArena :: default ( ) ;
36- let terms_cx = terms:: determine_parameters_to_be_inferred ( tcx, & mut arena) ;
35+ let arena = DroplessArena :: default ( ) ;
36+ let terms_cx = terms:: determine_parameters_to_be_inferred ( tcx, & arena) ;
3737 let constraints_cx = constraints:: add_constraints_from_crate ( terms_cx) ;
3838 solve:: solve_constraints ( constraints_cx)
3939}
Original file line number Diff line number Diff line change 99// `InferredIndex` is a newtype'd int representing the index of such
1010// a variable.
1111
12- use rustc_arena:: TypedArena ;
12+ use rustc_arena:: DroplessArena ;
1313use rustc_hir as hir;
1414use rustc_hir:: itemlikevisit:: ItemLikeVisitor ;
1515use rustc_hir:: HirIdMap ;
@@ -47,7 +47,7 @@ impl<'a> fmt::Debug for VarianceTerm<'a> {
4747
4848pub struct TermsContext < ' a , ' tcx > {
4949 pub tcx : TyCtxt < ' tcx > ,
50- pub arena : & ' a TypedArena < VarianceTerm < ' a > > ,
50+ pub arena : & ' a DroplessArena ,
5151
5252 // For marker types, UnsafeCell, and other lang items where
5353 // variance is hardcoded, records the item-id and the hardcoded
@@ -64,7 +64,7 @@ pub struct TermsContext<'a, 'tcx> {
6464
6565pub fn determine_parameters_to_be_inferred < ' a , ' tcx > (
6666 tcx : TyCtxt < ' tcx > ,
67- arena : & ' a mut TypedArena < VarianceTerm < ' a > > ,
67+ arena : & ' a DroplessArena ,
6868) -> TermsContext < ' a , ' tcx > {
6969 let mut terms_cx = TermsContext {
7070 tcx,
You can’t perform that action at this time.
0 commit comments