X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_hir_typeck%2Fsrc%2F_match.rs;h=e3afc117bb2ad8048ed3b53000d5327e8242f72f;hb=7f3af726065d9eaabf93d87f22d97f60cca7a5f1;hp=1d55378b91bd331a7ae17577002077ce4c7eaa0e;hpb=9b9c7d0ecc9d902b3ed5eac2f06f8669fed57f43;p=rust.git diff --git a/compiler/rustc_hir_typeck/src/_match.rs b/compiler/rustc_hir_typeck/src/_match.rs index 1d55378b91b..e3afc117bb2 100644 --- a/compiler/rustc_hir_typeck/src/_match.rs +++ b/compiler/rustc_hir_typeck/src/_match.rs @@ -518,7 +518,7 @@ pub(crate) fn opt_suggest_box_span( let substs = sig.output().walk().find_map(|arg| { if let ty::GenericArgKind::Type(ty) = arg.unpack() - && let ty::Opaque(def_id, substs) = *ty.kind() + && let ty::Opaque(ty::OpaqueTy { def_id, substs }) = *ty.kind() && def_id == rpit_def_id { Some(substs) @@ -539,17 +539,19 @@ pub(crate) fn opt_suggest_box_span( .subst_iter_copied(self.tcx, substs) { let pred = pred.kind().rebind(match pred.kind().skip_binder() { - ty::PredicateKind::Trait(trait_pred) => { + ty::PredicateKind::Clause(ty::Clause::Trait(trait_pred)) => { assert_eq!(trait_pred.trait_ref.self_ty(), opaque_ty); - ty::PredicateKind::Trait(trait_pred.with_self_type(self.tcx, ty)) + ty::PredicateKind::Clause(ty::Clause::Trait( + trait_pred.with_self_type(self.tcx, ty), + )) } - ty::PredicateKind::Projection(mut proj_pred) => { + ty::PredicateKind::Clause(ty::Clause::Projection(mut proj_pred)) => { assert_eq!(proj_pred.projection_ty.self_ty(), opaque_ty); proj_pred.projection_ty.substs = self.tcx.mk_substs_trait( ty, proj_pred.projection_ty.substs.iter().skip(1), ); - ty::PredicateKind::Projection(proj_pred) + ty::PredicateKind::Clause(ty::Clause::Projection(proj_pred)) } _ => continue, });