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::{
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)),