From f45502d20d771503281e5d1159be6e60a0b9d188 Mon Sep 17 00:00:00 2001 From: lcnr Date: Mon, 12 Jun 2023 11:58:40 +0200 Subject: [PATCH 1/2] extend assert --- compiler/rustc_infer/src/infer/combine.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_infer/src/infer/combine.rs b/compiler/rustc_infer/src/infer/combine.rs index 7a80ee98cb3c1..bb2bd2faec208 100644 --- a/compiler/rustc_infer/src/infer/combine.rs +++ b/compiler/rustc_infer/src/infer/combine.rs @@ -34,7 +34,7 @@ use rustc_middle::infer::unify_key::{ConstVarValue, ConstVariableValue}; use rustc_middle::infer::unify_key::{ConstVariableOrigin, ConstVariableOriginKind}; use rustc_middle::ty::error::{ExpectedFound, TypeError}; use rustc_middle::ty::relate::{RelateResult, TypeRelation}; -use rustc_middle::ty::{self, AliasKind, InferConst, ToPredicate, Ty, TyCtxt, TypeVisitableExt}; +use rustc_middle::ty::{self, InferConst, ToPredicate, Ty, TyCtxt, TypeVisitableExt}; use rustc_middle::ty::{IntType, UintType}; use rustc_span::DUMMY_SP; @@ -103,12 +103,12 @@ impl<'tcx> InferCtxt<'tcx> { // We don't expect `TyVar` or `Fresh*` vars at this point with lazy norm. ( - ty::Alias(AliasKind::Projection, _), + ty::Alias(..), ty::Infer(ty::TyVar(_) | ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)), ) | ( ty::Infer(ty::TyVar(_) | ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)), - ty::Alias(AliasKind::Projection, _), + ty::Alias(..), ) if self.next_trait_solver() => { bug!() } From e74d1cd581411a8d307ad9ee286f6f8fc785e002 Mon Sep 17 00:00:00 2001 From: lcnr Date: Mon, 12 Jun 2023 12:47:09 +0200 Subject: [PATCH 2/2] update comment --- compiler/rustc_trait_selection/src/solve/assembly/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs index f32ff0442a4c5..1b749b9c854cd 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs @@ -320,7 +320,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { candidates } - /// If the self type of a goal is a projection, computing the relevant candidates is difficult. + /// If the self type of a goal is an alias, computing the relevant candidates is difficult. /// /// To deal with this, we first try to normalize the self type and add the candidates for the normalized /// self type to the list of candidates in case that succeeds. We also have to consider candidates with the