Skip to content

Commit 05f98db

Browse files
committed
1 parent 435247a commit 05f98db

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
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
{
@@ -559,7 +559,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for InferenceCleanupFolder<'a, 'tcx> {
559559
use rustc_middle::ty::TypeAndMut;
560560

561561
let t1 = ty.super_fold_with(self);
562-
match t1.kind {
562+
match *t1.kind() {
563563
TyKind::Ref(region, ty, mutbl) if region.needs_infer() => {
564564
let ty_and_mut = TypeAndMut { ty, mutbl };
565565
self.infcx

src/traverse.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -599,12 +599,10 @@ fn diff_traits<'tcx>(
599599
debug!("trait_ref substs (old): {:?}", trait_ref.substs);
600600

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

11031101
TyKind::Array(t, _)

0 commit comments

Comments
 (0)