diff options
| author | Shoyu Vanilla <modulo641@gmail.com> | 2024-08-22 00:32:44 +0900 |
|---|---|---|
| committer | Shoyu Vanilla <modulo641@gmail.com> | 2024-08-22 00:32:44 +0900 |
| commit | db2e8e1ed0e0aa4f4c9e3f5712c4c9351a7bf2e2 (patch) | |
| tree | a07aade54da57f3ffab557ace95ec279b269fc8b | |
| parent | 9cb66c2c02d272209d610b6724536c7625b64c84 (diff) | |
| download | rust-db2e8e1ed0e0aa4f4c9e3f5712c4c9351a7bf2e2.tar.gz rust-db2e8e1ed0e0aa4f4c9e3f5712c4c9351a7bf2e2.zip | |
fix: Wrong `Sized` predicate for `generic_predicates_for_param`
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir-ty/src/lower.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/lower.rs b/src/tools/rust-analyzer/crates/hir-ty/src/lower.rs index 5824c59c5a5..58c34cbd9e1 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/lower.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/lower.rs @@ -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; } |
