Rollup merge of #68573 - GuillaumeGomez:clean-up-e0262, r=Dylan-DPC

Clean up E0262 explanation

r? @Dylan-DPC
This commit is contained in:
Yuki Okushi 2020-01-28 10:48:20 +09:00 committed by GitHub
commit ee79cf28db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,12 @@
Declaring certain lifetime names in parameters is disallowed. For example,
because the `'static` lifetime is a special built-in lifetime name denoting
the lifetime of the entire program, this is an error:
An invalid name was used for a lifetime parameter.
Erroneous code example:
```compile_fail,E0262
// error, invalid lifetime parameter name `'static`
fn foo<'static>(x: &'static str) { }
```
Declaring certain lifetime names in parameters is disallowed. For example,
because the `'static` lifetime is a special built-in lifetime name denoting
the lifetime of the entire program, this is an error: