Skip to content

Commit ab23df5

Browse files
committed
1 parent 4e57532 commit ab23df5

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2020-08-07
1+
nightly-2020-09-10

src/mismatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
147147
self.current_new_types.insert(b);
148148

149149
debug!("tys: mismatch relation: a: {:?}, b: {:?}", a, b);
150-
let matching = match (&a.kind, &b.kind) {
150+
let matching = match (a.kind(), b.kind()) {
151151
(&TyKind::Adt(a_def, a_substs), &TyKind::Adt(b_def, b_substs)) => {
152152
if self.check_substs(a_substs, b_substs) {
153153
let _ = self.relate_item_substs(a_def.did, a_substs, b_substs)?;

src/translate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
169169
orig.fold_with(&mut BottomUpFolder {
170170
tcx: self.tcx,
171171
ty_op: |ty| {
172-
match ty.kind {
172+
match *ty.kind() {
173173
TyKind::Adt(&AdtDef { ref did, .. }, substs)
174174
if self.needs_translation(*did) =>
175175
{
@@ -553,7 +553,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for InferenceCleanupFolder<'a, 'tcx> {
553553
use rustc_middle::ty::TypeAndMut;
554554

555555
let t1 = ty.super_fold_with(self);
556-
match t1.kind {
556+
match *t1.kind() {
557557
TyKind::Ref(region, ty, mutbl) if region.needs_infer() => {
558558
let ty_and_mut = TypeAndMut { ty, mutbl };
559559
self.infcx

src/traverse.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ fn diff_traits<'tcx>(
570570
) {
571571
use rustc_hir::Unsafety::Unsafe;
572572
use rustc_middle::ty::subst::GenericArgKind::Type;
573-
use rustc_middle::ty::{ParamTy, PredicateAtom, TyS};
573+
use rustc_middle::ty::{ParamTy, PredicateAtom};
574574

575575
debug!(
576576
"diff_traits: old: {:?}, new: {:?}, output: {:?}",
@@ -598,12 +598,10 @@ fn diff_traits<'tcx>(
598598
debug!("trait_ref substs (old): {:?}", trait_ref.substs);
599599

600600
if id_mapping.is_private_trait(trait_ref.def_id) && trait_ref.substs.len() == 1 {
601-
if let Type(&TyS {
602-
kind: TyKind::Param(ParamTy { index: 0, .. }),
603-
..
604-
}) = trait_ref.substs[0].unpack()
605-
{
606-
old_sealed = true;
601+
if let Type(typ) = trait_ref.substs[0].unpack() {
602+
if let TyKind::Param(ParamTy { index: 0, .. }) = typ.kind() {
603+
old_sealed = true;
604+
}
607605
}
608606
}
609607
}
@@ -1096,7 +1094,7 @@ fn diff_inherent_impls<'tcx>(
10961094
#[allow(clippy::match_same_arms)]
10971095
fn is_impl_trait_public<'tcx>(tcx: TyCtxt<'tcx>, impl_def_id: DefId) -> bool {
10981096
fn type_visibility(tcx: TyCtxt, ty: Ty) -> Visibility {
1099-
match ty.kind {
1097+
match ty.kind() {
11001098
TyKind::Adt(def, _) => tcx.visibility(def.did),
11011099

11021100
TyKind::Array(t, _)

0 commit comments

Comments
 (0)