Skip to content

Commit db2e8e1

Browse files
committed
fix: Wrong Sized predicate for generic_predicates_for_param
1 parent 9cb66c2 commit db2e8e1

File tree

1 file changed

+4
-0
lines changed
  • src/tools/rust-analyzer/crates/hir-ty/src

1 file changed

+4
-0
lines changed

src/tools/rust-analyzer/crates/hir-ty/src/lower.rs

+4
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)