Skip to content

Commit 5744aea

Browse files
committed
Auto merge of #1121 - rust-lang:rustup, r=RalfJung
Rustup to rustc 1.42.0-nightly (005cf38f7 2019-12-22)
2 parents 02bba3f + 1ffa62f commit 5744aea

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9ff30a7810c586819a78188c173a7b74adbb9730
1+
9ae6cedb8d1e37469be1434642a3e403fce50a03

src/stacked_borrows.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ use std::fmt;
77
use std::num::NonZeroU64;
88
use std::rc::Rc;
99

10-
use rustc::hir::Mutability::{Immutable, Mutable};
10+
use rustc::hir::Mutability;
1111
use rustc::mir::RetagKind;
1212
use rustc::ty::{self, layout::Size};
13+
use rustc::ty::{self, layout::Size};
1314

1415
use crate::{
1516
AllocId, HelpersEvalContextExt, ImmTy, Immediate, InterpResult, MPlaceTy, MemoryKind,
@@ -604,14 +605,15 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
604605
fn qualify(ty: ty::Ty<'_>, kind: RetagKind) -> Option<(RefKind, bool)> {
605606
match ty.kind {
606607
// References are simple.
607-
ty::Ref(_, _, Mutable) => Some((
608+
ty::Ref(_, _, Mutability::Mut) => Some((
608609
RefKind::Unique { two_phase: kind == RetagKind::TwoPhase },
609610
kind == RetagKind::FnEntry,
610611
)),
611-
ty::Ref(_, _, Immutable) => Some((RefKind::Shared, kind == RetagKind::FnEntry)),
612+
ty::Ref(_, _, Mutability::Not) =>
613+
Some((RefKind::Shared, kind == RetagKind::FnEntry)),
612614
// Raw pointers need to be enabled.
613615
ty::RawPtr(tym) if kind == RetagKind::Raw =>
614-
Some((RefKind::Raw { mutable: tym.mutbl == Mutable }, false)),
616+
Some((RefKind::Raw { mutable: tym.mutbl == Mutability::Mut }, false)),
615617
// Boxes do not get a protector: protectors reflect that references outlive the call
616618
// they were passed in to; that's just not the case for boxes.
617619
ty::Adt(..) if ty.is_box() => Some((RefKind::Unique { two_phase: false }, false)),

0 commit comments

Comments
 (0)