-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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.