mirror of https://github.com/rust-lang/rust
27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
error: lifetime parameters must be declared prior to type and const parameters
|
|
--> $DIR/lifetime-before-type-params.rs:2:13
|
|
|
|
|
LL | fn first<T, 'a, 'b>() {}
|
|
| ----^^--^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, T>`
|
|
|
|
error: lifetime parameters must be declared prior to type and const parameters
|
|
--> $DIR/lifetime-before-type-params.rs:4:18
|
|
|
|
|
LL | fn second<'a, T, 'b>() {}
|
|
| --------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, T>`
|
|
|
|
error: lifetime parameters must be declared prior to type and const parameters
|
|
--> $DIR/lifetime-before-type-params.rs:6:16
|
|
|
|
|
LL | fn third<T, U, 'a>() {}
|
|
| -------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, T, U>`
|
|
|
|
error: lifetime parameters must be declared prior to type and const parameters
|
|
--> $DIR/lifetime-before-type-params.rs:8:18
|
|
|
|
|
LL | fn fourth<'a, T, 'b, U, 'c, V>() {}
|
|
| --------^^-----^^---- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, 'c, T, U, V>`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|