-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
This compiles:
fn lifetime<'a>()
where &'a (): 'a
{
/* do nothing */
}
fn main() {
lifetime::<'static>()
}
as does this:
fn lifetime<'a>() {}
fn main() {
lifetime();
}
but this fails:
fn lifetime<'a>() {}
fn main() {
lifetime::<'static>();
}
rustc 1.19.0-nightly (5dfcd85fd 2017-05-19)
error[E0088]: too many lifetime parameters provided: expected at most 0 lifetime parameters, found 1 lifetime parameter
--> <anon>:3:5
|
3 | lifetime::<'static>();
| ^^^^^^^^^^^^^^^^^^^ expected 0 lifetime parameters
error: aborting due to previous error
gmorenz
Metadata
Metadata
Assignees
Labels
P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.