-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-type-systemArea: Type systemArea: Type system
Description
The following code fails to compile despite i32: 'static:
fn foo<T>() where for<'a> T: 'a {}
fn main() {
foo::<i32>();
}The exact error is:
foo.rs:4:5: 4:15 error: the requirement `for<'a> i32 : 'a` is not satisfied [E0280]
foo.rs:4 foo::<i32>();
^~~~~~~~~~
Per @nikomatsakis's comment here, it seems that T: 'static could imply for<'a> T: 'a.
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-type-systemArea: Type systemArea: Type system