Add term to ExistentialProjection
Also prevent ICE when adding a const in associated const equality.
This commit is contained in:
parent
f396888c4d
commit
1c1ce2fbda
35 changed files with 213 additions and 71 deletions
|
@ -69,7 +69,7 @@ use rustc_middle::ty::error::TypeError;
|
|||
use rustc_middle::ty::{
|
||||
self,
|
||||
subst::{GenericArgKind, Subst, SubstsRef},
|
||||
Region, Term, Ty, TyCtxt, TypeFoldable,
|
||||
Region, Ty, TyCtxt, TypeFoldable,
|
||||
};
|
||||
use rustc_span::{sym, BytePos, DesugaringKind, MultiSpan, Pos, Span};
|
||||
use rustc_target::spec::abi;
|
||||
|
@ -1780,11 +1780,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||
{
|
||||
if projection_predicate.projection_ty.item_def_id == item_def_id {
|
||||
// We don't account for multiple `Future::Output = Ty` contraints.
|
||||
match projection_predicate.term {
|
||||
Term::Ty(ty) => return Some(ty),
|
||||
// Can return None, but not sure if that makes sense?
|
||||
Term::Const(_c) => todo!(),
|
||||
}
|
||||
return projection_predicate.term.ty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue