diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-01-27 17:43:02 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-01-27 17:43:02 +0100 |
| commit | 4b0fe2ac63b983425c82a45cdb930019f36409bf (patch) | |
| tree | 377ed7554fcae0d4004f9cf3c41274dcdb45f34d | |
| parent | 320ada6479b3e29c7d9a66bc56ac44c2d2b57566 (diff) | |
| download | rust-4b0fe2ac63b983425c82a45cdb930019f36409bf.tar.gz rust-4b0fe2ac63b983425c82a45cdb930019f36409bf.zip | |
Clean up E0262 explanation
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0262.md | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/librustc_error_codes/error_codes/E0262.md b/src/librustc_error_codes/error_codes/E0262.md index 2dca6b1bb07..67419d53ef9 100644 --- a/src/librustc_error_codes/error_codes/E0262.md +++ b/src/librustc_error_codes/error_codes/E0262.md @@ -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: |
