rust/tests/ui/lint/elided-named-lifetimes/static.stderr

52 lines
1.6 KiB
Plaintext

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)]
| ^^^^^^^^^^^^^^^^^^^^^^
help: consider specifying it explicitly
|
LL | fn ampersand(x: &'static u8) -> &'static u8 {
| +++++++
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`
|
help: consider specifying it explicitly
|
LL | fn brackets(x: &'static u8) -> Brackets<'static> {
| +++++++++
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`
|
help: consider specifying it explicitly
|
LL | fn comma(x: &'static u8) -> Comma<'static, u8> {
| ++++++++
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`
|
help: consider specifying it explicitly
|
LL | fn underscore(x: &'static u8) -> &'static u8 {
| ~~~~~~~
error: aborting due to 4 previous errors