Skip to content

Commit ee79cf2

Browse files
authored
Rollup merge of #68573 - GuillaumeGomez:clean-up-e0262, r=Dylan-DPC
Clean up E0262 explanation r? @Dylan-DPC
2 parents 8bc0e48 + 4b0fe2a commit ee79cf2

File tree

1 file changed

+7
-3
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+7
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
Declaring certain lifetime names in parameters is disallowed. For example,
2-
because the `'static` lifetime is a special built-in lifetime name denoting
3-
the lifetime of the entire program, this is an error:
1+
An invalid name was used for a lifetime parameter.
2+
3+
Erroneous code example:
44

55
```compile_fail,E0262
66
// error, invalid lifetime parameter name `'static`
77
fn foo<'static>(x: &'static str) { }
88
```
9+
10+
Declaring certain lifetime names in parameters is disallowed. For example,
11+
because the `'static` lifetime is a special built-in lifetime name denoting
12+
the lifetime of the entire program, this is an error:

0 commit comments

Comments
 (0)