-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
The following code [playground]:
pub struct Bar
where
for<'a> &'a mut Self:;
fn main() {}
Should compile, but it does not. Instead it fails with:
error[E0477]: the type `&'a mut Bar` does not fulfill the required lifetime
--> src/main.rs:3:13
|
3 | for<'a> &'a mut Self:;
| ^^^^^^^^^^^^
|
note: type must outlive the empty lifetime as required by this binding
--> src/main.rs:3:13
|
3 | for<'a> &'a mut Self:;
| ^^^^^^^^^^^^
I think this is because we instantiate the predicate for<'a> &'a mut Self: ReEmpty(U0)
here, which doesn't hold because of the HRTB.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Activity
Trivial
predicate kind for where clauses with empty bounds #95231compiler-errors commentedon Jul 1, 2022
This is fixed with @jackh726's ReEmpty PR. Marking as needs test.
jackh726 commentedon Jul 1, 2022
wait huh
really? Which PR? The one open?
jackh726 commentedon Jul 1, 2022
Oh, I guess the TypeOutlives -> WellFormed.
Neat.
Add regression test for rust-lang#95230
Rollup merge of rust-lang#99394 - JohnTitor:issue-95230, r=compiler-e…
Rollup merge of rust-lang#99394 - JohnTitor:issue-95230, r=compiler-e…
Rollup merge of rust-lang#99394 - JohnTitor:issue-95230, r=compiler-e…
Auto merge of rust-lang#99422 - Dylan-DPC:rollup-htjofm6, r=Dylan-DPC