Skip to content

Commit 9cb785b

Browse files
authored
Rollup merge of rust-lang#112546 - lcnr:opaque-type-cleanup, r=compiler-errors
new solver: extend assert to other aliases
2 parents 9c4cff4 + e74d1cd commit 9cb785b

File tree

2 files changed

+4
-4
lines changed
  • compiler

2 files changed

+4
-4
lines changed

compiler/rustc_infer/src/infer/combine.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use rustc_middle::infer::unify_key::{ConstVarValue, ConstVariableValue};
3434
use rustc_middle::infer::unify_key::{ConstVariableOrigin, ConstVariableOriginKind};
3535
use rustc_middle::ty::error::{ExpectedFound, TypeError};
3636
use rustc_middle::ty::relate::{RelateResult, TypeRelation};
37-
use rustc_middle::ty::{self, AliasKind, InferConst, ToPredicate, Ty, TyCtxt, TypeVisitableExt};
37+
use rustc_middle::ty::{self, InferConst, ToPredicate, Ty, TyCtxt, TypeVisitableExt};
3838
use rustc_middle::ty::{IntType, UintType};
3939
use rustc_span::DUMMY_SP;
4040

@@ -103,12 +103,12 @@ impl<'tcx> InferCtxt<'tcx> {
103103

104104
// We don't expect `TyVar` or `Fresh*` vars at this point with lazy norm.
105105
(
106-
ty::Alias(AliasKind::Projection, _),
106+
ty::Alias(..),
107107
ty::Infer(ty::TyVar(_) | ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)),
108108
)
109109
| (
110110
ty::Infer(ty::TyVar(_) | ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)),
111-
ty::Alias(AliasKind::Projection, _),
111+
ty::Alias(..),
112112
) if self.next_trait_solver() => {
113113
bug!()
114114
}

compiler/rustc_trait_selection/src/solve/assembly/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
320320
candidates
321321
}
322322

323-
/// If the self type of a goal is a projection, computing the relevant candidates is difficult.
323+
/// If the self type of a goal is an alias, computing the relevant candidates is difficult.
324324
///
325325
/// To deal with this, we first try to normalize the self type and add the candidates for the normalized
326326
/// self type to the list of candidates in case that succeeds. We also have to consider candidates with the

0 commit comments

Comments
 (0)