2018-12-12 15:57:47 -06:00
|
|
|
error[E0310]: the parameter type `impl Debug` may not live long enough
|
2022-05-22 00:36:12 -05:00
|
|
|
--> $DIR/suggest-impl-trait-lifetime.rs:12:5
|
2018-12-12 15:57:47 -06:00
|
|
|
|
|
|
|
|
LL | bar(d);
|
2021-07-30 10:12:10 -05:00
|
|
|
| ^^^ ...so that the type `impl Debug` will meet its required lifetime bounds...
|
|
|
|
|
|
|
|
|
note: ...that is required by this bound
|
2022-05-22 00:36:12 -05:00
|
|
|
--> $DIR/suggest-impl-trait-lifetime.rs:17:24
|
2021-07-30 10:12:10 -05:00
|
|
|
|
|
|
|
|
LL | fn bar(d: impl Debug + 'static) {
|
|
|
|
| ^^^^^^^
|
2022-03-14 09:56:37 -05:00
|
|
|
help: consider adding an explicit lifetime bound...
|
|
|
|
|
|
|
|
|
LL | fn foo(d: impl Debug + 'static) {
|
|
|
|
| +++++++++
|
2018-12-12 15:57:47 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0310`.
|