2024-08-31 07:31:31 -05:00
|
|
|
error: elided lifetime has a name
|
|
|
|
--> $DIR/static.rs:16:33
|
|
|
|
|
|
|
|
|
LL | fn ampersand(x: &'static u8) -> &u8 {
|
|
|
|
| ^ this elided lifetime gets resolved as `'static`
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/static.rs:1:9
|
|
|
|
|
|
|
|
|
LL | #![deny(elided_named_lifetimes)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
2024-08-31 19:42:18 -05:00
|
|
|
help: consider specifying it explicitly
|
|
|
|
|
|
|
|
|
LL | fn ampersand(x: &'static u8) -> &'static u8 {
|
2024-08-31 20:08:55 -05:00
|
|
|
| +++++++
|
2024-08-31 07:31:31 -05:00
|
|
|
|
|
|
|
error: elided lifetime has a name
|
|
|
|
--> $DIR/static.rs:23:32
|
|
|
|
|
|
|
|
|
LL | fn brackets(x: &'static u8) -> Brackets {
|
|
|
|
| ^^^^^^^^ this elided lifetime gets resolved as `'static`
|
2024-08-31 19:42:18 -05:00
|
|
|
|
|
|
|
|
help: consider specifying it explicitly
|
|
|
|
|
|
|
|
|
LL | fn brackets(x: &'static u8) -> Brackets<'static> {
|
2024-08-31 20:08:55 -05:00
|
|
|
| +++++++++
|
2024-08-31 07:31:31 -05:00
|
|
|
|
|
|
|
error: elided lifetime has a name
|
|
|
|
--> $DIR/static.rs:30:34
|
|
|
|
|
|
|
|
|
LL | fn comma(x: &'static u8) -> Comma<u8> {
|
|
|
|
| ^ this elided lifetime gets resolved as `'static`
|
2024-08-31 19:42:18 -05:00
|
|
|
|
|
|
|
|
help: consider specifying it explicitly
|
|
|
|
|
|
|
|
|
LL | fn comma(x: &'static u8) -> Comma<'static, u8> {
|
2024-08-31 20:08:55 -05:00
|
|
|
| ++++++++
|
2024-08-31 07:31:31 -05:00
|
|
|
|
|
|
|
error: elided lifetime has a name
|
|
|
|
--> $DIR/static.rs:35:35
|
|
|
|
|
|
|
|
|
LL | fn underscore(x: &'static u8) -> &'_ u8 {
|
|
|
|
| ^^ this elided lifetime gets resolved as `'static`
|
2024-08-31 19:42:18 -05:00
|
|
|
|
|
|
|
|
help: consider specifying it explicitly
|
|
|
|
|
|
|
|
|
LL | fn underscore(x: &'static u8) -> &'static u8 {
|
|
|
|
| ~~~~~~~
|
2024-08-31 07:31:31 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|