diff options
| author | Michael Goulet <michael@errs.io> | 2023-11-19 19:14:35 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-19 19:14:35 -0800 |
| commit | 6388c0ef0443fb604b7443e3d617192c4a388020 (patch) | |
| tree | fbcf249a9724a35abf2c8259489e7ff0c01f6ecc /tests/rustdoc-js/slice-array.rs | |
| parent | 40a781b179be13cfbe89d0fdfd42632da6eb1e7b (diff) | |
| parent | 8f267e2b87d4e7b9f32ff0fae591270a05639ae1 (diff) | |
| download | rust-6388c0ef0443fb604b7443e3d617192c4a388020.tar.gz rust-6388c0ef0443fb604b7443e3d617192c4a388020.zip | |
Rollup merge of #118000 - compiler-errors:placeholder-ty-outlives, r=aliemjay
Make regionck care about placeholders in outlives components
Currently, we don't consider a placeholder type `!T` to be a type component when it comes to processing type-outlives obligations. This means that they are essentially treated like unit values with no sub-components, and always outlive any region. This is problematic for `non_lifetime_binders`, and even more problematic for `with_negative_coherence`, since negative coherence uses placeholders as universals.
This PR adds `Component::Placeholder` which acts much like `Component::Param`. This currently causes a regression in some non-lifetime-binders tests because `for<T> T: 'static` doesn't imply itself when processing outlives obligations, so code like this will fail:
```
fn foo() where for<T> T: 'static {
foo() //~ fails
}
```
Since the where clause doesn't imply itself. This requires making the `MatchAgainstHigherRankedOutlives` relation smarter when it comes to binders.
r? types
Diffstat (limited to 'tests/rustdoc-js/slice-array.rs')
0 files changed, 0 insertions, 0 deletions
