Auto merge of #1047 - RalfJung:uprust, r=RalfJung

rustup
This commit is contained in:
bors 2019-11-11 20:26:37 +00:00
commit 86f473810a
2 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
9e346646e93cc243567e27bb0f4e8716d56ad1f1
56237d75b4271a8a2e0f47d86ea76ebf6d966152

View File

@ -8,7 +8,7 @@ use std::fmt;
use std::num::NonZeroU64;
use rustc::ty::{self, layout::Size};
use rustc::hir::{MutMutable, MutImmutable};
use rustc::hir::Mutability::{Mutable, Immutable};
use rustc::mir::RetagKind;
use crate::{
@ -618,13 +618,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(_, _, MutMutable) =>
ty::Ref(_, _, Mutable) =>
Some((RefKind::Unique { two_phase: kind == RetagKind::TwoPhase}, kind == RetagKind::FnEntry)),
ty::Ref(_, _, MutImmutable) =>
ty::Ref(_, _, Immutable) =>
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 == MutMutable }, false)),
Some((RefKind::Raw { mutable: tym.mutbl == Mutable }, 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)),