mirror of
https://github.com/rust-lang/rust
synced 2024-09-15 22:50:55 +00:00
Add missing documentation for Session::time
This commit is contained in:
parent
155a5c2862
commit
8cab95ef9b
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue