mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
Rollup merge of #112546 - lcnr:opaque-type-cleanup, r=compiler-errors
new solver: extend assert to other aliases
This commit is contained in:
commit
9cb785b9d3
@ -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!()
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user