rust/src/librustc_error_codes/error_codes/E0262.md
2020-01-27 17:43:02 +01:00

398 B

An invalid name was used for a lifetime parameter.

Erroneous code example:

// 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: