blob: fb1848d130f772914efc8750925a6cf51d34a6ed [file] [log] [blame]
// run-rustfix
use std::fmt::Debug;
fn foo(d: impl Debug) {
//~^ HELP consider adding an explicit lifetime bound...
bar(d);
//~^ ERROR the parameter type `impl Debug` may not live long enough
//~| NOTE ...so that the type `impl Debug` will meet its required lifetime bounds
}
fn bar(d: impl Debug + 'static) { //~ NOTE ...that is required by this bound
println!("{:?}", d)
}
fn main() {
foo("hi");
}