fix: Wrong Sized predicate for generic_predicates_for_param

This commit is contained in:
Shoyu Vanilla 2024-08-22 00:32:44 +09:00
parent 3723e5910c
commit 71080cfb6b

View file

@ -1551,6 +1551,10 @@ pub(crate) fn generic_predicates_for_param_query(
}
};
if invalid_target {
// If this is filtered out without lowering, `?Sized` is not gathered into `ctx.unsized_types`
if let TypeBound::Path(_, TraitBoundModifier::Maybe) = &**bound {
ctx.lower_where_predicate(pred, &def, true).for_each(drop);
}
return false;
}