From 2c55a508e94c4390d94a843fd52114aa7a7940a7 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 11 Nov 2019 21:25:57 +0100 Subject: [PATCH] rustup --- rust-version | 2 +- src/stacked_borrows.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rust-version b/rust-version index ec45e1f9730..e6d05f2ed0e 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -9e346646e93cc243567e27bb0f4e8716d56ad1f1 +56237d75b4271a8a2e0f47d86ea76ebf6d966152 diff --git a/src/stacked_borrows.rs b/src/stacked_borrows.rs index 94e69203437..32715157a77 100644 --- a/src/stacked_borrows.rs +++ b/src/stacked_borrows.rs @@ -8,7 +8,7 @@ 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 @@ fn retag( 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)), -- 2.44.0