Rollup merge of #114021 - GuillaumeGomez:session-time-docs, r=lcnr

Add missing documentation for `Session::time`

r? `@lcnr`
This commit is contained in:
Matthias Krüger 2023-07-24 17:47:11 +02:00 committed by GitHub
commit a5164252ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<R>(&self, what: &'static str, f: impl FnOnce() -> R) -> R {
self.prof.verbose_generic_activity(what).run(f)
}