Auto merge of #16456 - davidbarsky:david/tracing-followups, r=Veykril

internal: `tracing` improvements and followups

Hi folks! Building on https://github.com/rust-lang/rust-analyzer/pull/16394, I've got a few small tweaks:
- Removed the accidental `mod.rs` usage that I introduced.
- Removed a panic in `pat_analysis.rs`.
- Recorded the event kind in `handle_event` to better distinguish what _kind_ of event is being handled.
- Did a small refactor of `hprof` to have somewhat more linear control flow, and more importantly, write the recorded fields to the output.

The end result is the following:
<img width="1530" alt="A screenshot of Visual Studio Code on a Mac. `hprof.rs` is open, with " src="bd11dde5-b2da-4774-bc38-bcb4772d1192">
This commit is contained in:
bors 2024-01-31 18:29:51 +00:00
commit 039681112f
5 changed files with 73 additions and 21 deletions

View file

@ -460,7 +460,8 @@ impl<'p> TypeCx for MatchCheckCtx<'p> {
_f: &mut fmt::Formatter<'_>,
_pat: &rustc_pattern_analysis::pat::DeconstructedPat<'_, Self>,
) -> fmt::Result {
unimplemented!()
// FIXME: implement this, as using `unimplemented!()` causes panics in `tracing`.
Ok(())
}
fn bug(&self, fmt: fmt::Arguments<'_>) -> ! {