Don't ICE on RPITIT when promoting trait preds to associated type bounds
This commit is contained in:
parent
8b4b20836b
commit
e54bc1c5ff
3 changed files with 24 additions and 0 deletions
|
@ -427,6 +427,8 @@ pub(super) fn explicit_predicates_of<'tcx>(
|
|||
// supertrait).
|
||||
if let ty::Alias(ty::Projection, projection) = ty.kind() {
|
||||
projection.substs == trait_identity_substs
|
||||
// FIXME(return_type_notation): This check should be more robust
|
||||
&& !tcx.is_impl_trait_in_trait(projection.def_id)
|
||||
&& tcx.associated_item(projection.def_id).container_id(tcx)
|
||||
== def_id.to_def_id()
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue