@@ -7,7 +7,7 @@ use std::fmt;
7
7
use std:: num:: NonZeroU64 ;
8
8
use std:: rc:: Rc ;
9
9
10
- use rustc:: hir:: Mutability :: { Immutable , Mutable } ;
10
+ use rustc:: hir:: Mutability ;
11
11
use rustc:: mir:: RetagKind ;
12
12
use rustc:: ty:: { self , layout:: Size } ;
13
13
@@ -604,14 +604,15 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
604
604
fn qualify ( ty : ty:: Ty < ' _ > , kind : RetagKind ) -> Option < ( RefKind , bool ) > {
605
605
match ty. kind {
606
606
// References are simple.
607
- ty:: Ref ( _, _, Mutable ) => Some ( (
607
+ ty:: Ref ( _, _, Mutability :: Mut ) => Some ( (
608
608
RefKind :: Unique { two_phase : kind == RetagKind :: TwoPhase } ,
609
609
kind == RetagKind :: FnEntry ,
610
610
) ) ,
611
- ty:: Ref ( _, _, Immutable ) => Some ( ( RefKind :: Shared , kind == RetagKind :: FnEntry ) ) ,
611
+ ty:: Ref ( _, _, Mutability :: Not ) =>
612
+ Some ( ( RefKind :: Shared , kind == RetagKind :: FnEntry ) ) ,
612
613
// Raw pointers need to be enabled.
613
614
ty:: RawPtr ( tym) if kind == RetagKind :: Raw =>
614
- Some ( ( RefKind :: Raw { mutable : tym. mutbl == Mutable } , false ) ) ,
615
+ Some ( ( RefKind :: Raw { mutable : tym. mutbl == Mutability :: Mut } , false ) ) ,
615
616
// Boxes do not get a protector: protectors reflect that references outlive the call
616
617
// they were passed in to; that's just not the case for boxes.
617
618
ty:: Adt ( ..) if ty. is_box ( ) => Some ( ( RefKind :: Unique { two_phase : false } , false ) ) ,
0 commit comments