From 8cab95ef9b56a90a17437fd8ac040c22535f8f4d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 24 Jul 2023 16:50:25 +0200 Subject: [PATCH] Add missing documentation for `Session::time` --- compiler/rustc_session/src/utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_session/src/utils.rs b/compiler/rustc_session/src/utils.rs index 1d15e2c28d837..71f2591fe6654 100644 --- a/compiler/rustc_session/src/utils.rs +++ b/compiler/rustc_session/src/utils.rs @@ -7,6 +7,7 @@ impl Session { pub fn timer(&self, what: &'static str) -> VerboseTimingGuard<'_> { self.prof.verbose_generic_activity(what) } + /// Used by `-Z self-profile`. pub fn time(&self, what: &'static str, f: impl FnOnce() -> R) -> R { self.prof.verbose_generic_activity(what).run(f) }