diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-01-28 10:48:20 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-28 10:48:20 +0900 |
| commit | ee79cf28db94a0f99dcd8f1e311569a0d504cd38 (patch) | |
| tree | 8f78c36f20870dfd0bd42a4c58e4fd4f427bfbe5 /src | |
| parent | 8bc0e48540b38edfae892828db6cacd3bc4e5b95 (diff) | |
| parent | 4b0fe2ac63b983425c82a45cdb930019f36409bf (diff) | |
| download | rust-ee79cf28db94a0f99dcd8f1e311569a0d504cd38.tar.gz rust-ee79cf28db94a0f99dcd8f1e311569a0d504cd38.zip | |
Rollup merge of #68573 - GuillaumeGomez:clean-up-e0262, r=Dylan-DPC
Clean up E0262 explanation r? @Dylan-DPC
Diffstat (limited to 'src')
| -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: |
