2024-08-31 15:31:31 +03:00
|
|
|
warning: elided lifetime has a name
|
|
|
|
|
--> $DIR/impl-fn-predefined-lifetimes.rs:4:48
|
|
|
|
|
|
|
|
|
|
|
LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
|
|
|
|
|
| -- lifetime `'a` declared here ^^ this elided lifetime gets resolved as `'a`
|
|
|
|
|
|
|
|
|
|
|
= note: `#[warn(elided_named_lifetimes)]` on by default
|
|
|
|
|
|
2024-03-18 16:03:18 +00:00
|
|
|
error[E0792]: expected generic lifetime parameter, found `'_`
|
2025-03-19 17:52:53 +01:00
|
|
|
--> $DIR/impl-fn-predefined-lifetimes.rs:6:9
|
2022-07-29 00:18:32 +04:00
|
|
|
|
|
|
|
|
|
LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
|
2024-03-18 16:03:18 +00:00
|
|
|
| -- this generic parameter must be used with a generic lifetime parameter
|
2025-03-19 17:52:53 +01:00
|
|
|
LL |
|
2024-03-18 16:03:18 +00:00
|
|
|
LL | |x| x
|
|
|
|
|
| ^
|
2022-07-29 00:18:32 +04:00
|
|
|
|
2025-03-19 17:52:53 +01:00
|
|
|
error: aborting due to 1 previous error; 1 warning emitted
|
2022-07-29 00:18:32 +04:00
|
|
|
|
2025-03-19 17:52:53 +01:00
|
|
|
For more information about this error, try `rustc --explain E0792`.
|