Skip to content

Commit 71080cf

Browse files
committed
fix: Wrong Sized predicate for generic_predicates_for_param
1 parent 3723e59 commit 71080cf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/hir-ty/src/lower.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,10 @@ pub(crate) fn generic_predicates_for_param_query(
15511551
}
15521552
};
15531553
if invalid_target {
1554+
// If this is filtered out without lowering, `?Sized` is not gathered into `ctx.unsized_types`
1555+
if let TypeBound::Path(_, TraitBoundModifier::Maybe) = &**bound {
1556+
ctx.lower_where_predicate(pred, &def, true).for_each(drop);
1557+
}
15541558
return false;
15551559
}
15561560

0 commit comments

Comments
 (0)