diff --git a/rust-version b/rust-version index f3c0b833d1..69d99aa2b8 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -9ff30a7810c586819a78188c173a7b74adbb9730 +005cf38f7e66757b32b03ea35fedca372eb063e3 diff --git a/src/stacked_borrows.rs b/src/stacked_borrows.rs index 8782eb83d1..019722f67c 100644 --- a/src/stacked_borrows.rs +++ b/src/stacked_borrows.rs @@ -8,7 +8,7 @@ use std::fmt; use std::num::NonZeroU64; use rustc::ty::{self, layout::Size}; -use rustc::hir::Mutability::{Mutable, Immutable}; +use rustc::hir::Mutability; use rustc::mir::RetagKind; use crate::{ @@ -634,13 +634,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx fn qualify(ty: ty::Ty<'_>, kind: RetagKind) -> Option<(RefKind, bool)> { match ty.kind { // References are simple. - ty::Ref(_, _, Mutable) => + ty::Ref(_, _, Mutability::Mut) => Some((RefKind::Unique { two_phase: kind == RetagKind::TwoPhase}, kind == RetagKind::FnEntry)), - ty::Ref(_, _, Immutable) => + ty::Ref(_, _, Mutability::Not) => Some((RefKind::Shared, kind == RetagKind::FnEntry)), // Raw pointers need to be enabled. ty::RawPtr(tym) if kind == RetagKind::Raw => - Some((RefKind::Raw { mutable: tym.mutbl == Mutable }, false)), + Some((RefKind::Raw { mutable: tym.mutbl == Mutability::Mut }, false)), // Boxes do not get a protector: protectors reflect that references outlive the call // they were passed in to; that's just not the case for boxes. ty::Adt(..) if ty.is_box() => Some((RefKind::Unique { two_phase: false }, false)),