@@ -7,7 +7,7 @@ use std::fmt;
77use std:: num:: NonZeroU64 ;
88use std:: rc:: Rc ;
99
10- use rustc:: hir:: Mutability :: { Immutable , Mutable } ;
10+ use rustc:: hir:: Mutability ;
1111use rustc:: mir:: RetagKind ;
1212use rustc:: ty:: { self , layout:: Size } ;
1313
@@ -604,14 +604,15 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
604604 fn qualify ( ty : ty:: Ty < ' _ > , kind : RetagKind ) -> Option < ( RefKind , bool ) > {
605605 match ty. kind {
606606 // References are simple.
607- ty:: Ref ( _, _, Mutable ) => Some ( (
607+ ty:: Ref ( _, _, Mutability :: Mut ) => Some ( (
608608 RefKind :: Unique { two_phase : kind == RetagKind :: TwoPhase } ,
609609 kind == RetagKind :: FnEntry ,
610610 ) ) ,
611- ty:: Ref ( _, _, Immutable ) => Some ( ( RefKind :: Shared , kind == RetagKind :: FnEntry ) ) ,
611+ ty:: Ref ( _, _, Mutability :: Not ) =>
612+ Some ( ( RefKind :: Shared , kind == RetagKind :: FnEntry ) ) ,
612613 // Raw pointers need to be enabled.
613614 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 ) ) ,
615616 // Boxes do not get a protector: protectors reflect that references outlive the call
616617 // they were passed in to; that's just not the case for boxes.
617618 ty:: Adt ( ..) if ty. is_box ( ) => Some ( ( RefKind :: Unique { two_phase : false } , false ) ) ,
0 commit comments