diff --git a/src/driver.rs b/src/driver.rs index 8a1edc12a8e..26188808d5a 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -363,7 +363,7 @@ fn trans_mono_item<'clif, 'tcx, B: Backend + 'static>( } } -fn time(sess: &Session, name: &str, f: impl FnOnce() -> R) -> R { +fn time(sess: &Session, name: &'static str, f: impl FnOnce() -> R) -> R { println!("[{}] start", name); let before = std::time::Instant::now(); let res = sess.time(name, f);