1
Fork 0

Assume we can normalize trait default method RPITITs in param-env instead

This commit is contained in:
Michael Goulet 2023-02-17 17:16:43 +00:00
parent be55ad53a1
commit d42a3fbd69
3 changed files with 81 additions and 4 deletions

View file

@ -1599,7 +1599,7 @@ fn check_return_position_impl_trait_in_trait_bounds<'tcx>(
{
for arg in fn_output.walk() {
if let ty::GenericArgKind::Type(ty) = arg.unpack()
&& let ty::Alias(ty::Projection, proj) = ty.kind()
&& let ty::Alias(ty::Opaque, proj) = ty.kind()
&& tcx.def_kind(proj.def_id) == DefKind::ImplTraitPlaceholder
&& tcx.impl_trait_in_trait_parent(proj.def_id) == fn_def_id.to_def_id()
{