Skip to content

Commit b1e97df

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 + bac2615 commit b1e97df

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ 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};
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

Comments
 (0)