summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0262.md
blob: 67419d53ef9d10c064d3ea1b1d1179741e34ce62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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: