2024-08-31 07:31:31 -05:00
|
|
|
warning: elided lifetime has a name
|
|
|
|
--> $DIR/not-tied-to-crate.rs:5:31
|
|
|
|
|
|
|
|
|
LL | fn bar(x: &'static u8) -> &u8 {
|
|
|
|
| ^ this elided lifetime gets resolved as `'static`
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/not-tied-to-crate.rs:3:8
|
|
|
|
|
|
|
|
|
LL | #[warn(elided_named_lifetimes)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
2024-08-31 19:42:18 -05:00
|
|
|
help: consider specifying it explicitly
|
|
|
|
|
|
|
|
|
LL | fn bar(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/not-tied-to-crate.rs:11:31
|
|
|
|
|
|
|
|
|
LL | fn baz(x: &'static u8) -> &u8 {
|
|
|
|
| ^ this elided lifetime gets resolved as `'static`
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/not-tied-to-crate.rs:10:12
|
|
|
|
|
|
|
|
|
LL | #[deny(elided_named_lifetimes)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
2024-08-31 19:42:18 -05:00
|
|
|
help: consider specifying it explicitly
|
|
|
|
|
|
|
|
|
LL | fn baz(x: &'static u8) -> &'static u8 {
|
2024-08-31 20:08:55 -05:00
|
|
|
| +++++++
|
2024-08-31 07:31:31 -05:00
|
|
|
|
|
|
|
error: aborting due to 1 previous error; 1 warning emitted
|
|
|
|
|