2018-12-12 13:57:47 -08:00
|
|
|
error[E0310]: the parameter type `impl Debug` may not live long enough
|
2022-04-01 13:13:25 -04:00
|
|
|
--> $DIR/suggest-impl-trait-lifetime.rs:7:5
|
2018-12-12 13:57:47 -08:00
|
|
|
|
|
|
|
|
LL | bar(d);
|
2023-09-17 14:32:02 +00:00
|
|
|
| ^^^^^^
|
|
|
|
| |
|
|
|
|
| the parameter type `impl Debug` must be valid for the static lifetime...
|
|
|
|
| ...so that the type `impl Debug` will meet its required lifetime bounds
|
2021-07-30 08:12:10 -07:00
|
|
|
|
|
2023-10-08 10:06:17 +00:00
|
|
|
help: consider adding an explicit lifetime bound
|
2022-03-14 15:56:37 +01:00
|
|
|
|
|
|
|
|
LL | fn foo(d: impl Debug + 'static) {
|
|
|
|
| +++++++++
|
2018-12-12 13:57:47 -08:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-12-12 13:57:47 -08:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0310`.
|