File tree 2 files changed +6
-6
lines changed
compiler/rustc_typeck/src/variance
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 4
4
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/variance.html
5
5
6
6
use hir:: Node ;
7
- use rustc_arena:: TypedArena ;
7
+ use rustc_arena:: DroplessArena ;
8
8
use rustc_hir as hir;
9
9
use rustc_hir:: def_id:: { CrateNum , DefId , LOCAL_CRATE } ;
10
10
use rustc_middle:: ty:: query:: Providers ;
@@ -32,8 +32,8 @@ pub fn provide(providers: &mut Providers) {
32
32
33
33
fn crate_variances ( tcx : TyCtxt < ' _ > , crate_num : CrateNum ) -> CrateVariancesMap < ' _ > {
34
34
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) ;
37
37
let constraints_cx = constraints:: add_constraints_from_crate ( terms_cx) ;
38
38
solve:: solve_constraints ( constraints_cx)
39
39
}
Original file line number Diff line number Diff line change 9
9
// `InferredIndex` is a newtype'd int representing the index of such
10
10
// a variable.
11
11
12
- use rustc_arena:: TypedArena ;
12
+ use rustc_arena:: DroplessArena ;
13
13
use rustc_hir as hir;
14
14
use rustc_hir:: itemlikevisit:: ItemLikeVisitor ;
15
15
use rustc_hir:: HirIdMap ;
@@ -47,7 +47,7 @@ impl<'a> fmt::Debug for VarianceTerm<'a> {
47
47
48
48
pub struct TermsContext < ' a , ' tcx > {
49
49
pub tcx : TyCtxt < ' tcx > ,
50
- pub arena : & ' a TypedArena < VarianceTerm < ' a > > ,
50
+ pub arena : & ' a DroplessArena ,
51
51
52
52
// For marker types, UnsafeCell, and other lang items where
53
53
// variance is hardcoded, records the item-id and the hardcoded
@@ -64,7 +64,7 @@ pub struct TermsContext<'a, 'tcx> {
64
64
65
65
pub fn determine_parameters_to_be_inferred < ' a , ' tcx > (
66
66
tcx : TyCtxt < ' tcx > ,
67
- arena : & ' a mut TypedArena < VarianceTerm < ' a > > ,
67
+ arena : & ' a DroplessArena ,
68
68
) -> TermsContext < ' a , ' tcx > {
69
69
let mut terms_cx = TermsContext {
70
70
tcx,
You can’t perform that action at this time.
0 commit comments