]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_session/utils.rs
Rollup merge of #68108 - varkor:chained-comparison-suggestions, r=Centril
[rust.git] / src / librustc_session / utils.rs
index 7806f5e8753f22b9fcea1275ecabcf33e7571ca1..fda11b647490f709c50a3f222cda9b444246ff3d 100644 (file)
@@ -2,11 +2,11 @@
 use rustc_data_structures::profiling::VerboseTimingGuard;
 
 impl Session {
-    pub fn timer<'a>(&'a self, what: &'a str) -> VerboseTimingGuard<'a> {
-        self.prof.sparse_pass(what)
+    pub fn timer<'a>(&'a self, what: &'static str) -> VerboseTimingGuard<'a> {
+        self.prof.verbose_generic_activity(what)
     }
-    pub fn time<R>(&self, what: &str, f: impl FnOnce() -> R) -> R {
-        self.prof.sparse_pass(what).run(f)
+    pub fn time<R>(&self, what: &'static str, f: impl FnOnce() -> R) -> R {
+        self.prof.verbose_generic_activity(what).run(f)
     }
 }