1149 Commits

Author SHA1 Message Date
Josh Triplett
c99320156d Refactor lint buffering to avoid requiring a giant enum
Lint buffering currently relies on a giant enum `BuiltinLintDiag`
containing all the lints that might potentially get buffered. In
addition to being an unwieldy enum in a central crate, this also makes
`rustc_lint_defs` a build bottleneck: it depends on various types from
various crates (with a steady pressure to add more), and many crates
depend on it.

Having all of these variants in a separate crate also prevents detecting
when a variant becomes unused, which we can do with a dedicated type
defined and used in the same crate.

Refactor this to use a dyn trait, to allow using `LintDiagnostic` types
directly.

This requires boxing, but all of this is already on the slow path
(emitting an error).

Because the existing `BuiltinLintDiag` requires some additional types in
order to decorate some variants, which are only available later in
`rustc_lint`, use an enum `DecorateDiagCompat` to handle both the `dyn
LintDiagnostic` case and the `BuiltinLintDiag` case.
2025-08-22 01:59:56 -07:00
Josh Triplett
f3c8b7ad40 Split rustc_hir_id out of rustc_hir
Some crates depend on `rustc_hir` but only want `HirId` and similar id
types. `rustc_hir` is a heavy dependency, since it pulls in
`rustc_target`. Split these types out into their own crate
`rustc_hir_id`.

This allows `rustc_errors` to drop its direct dependency on `rustc_hir`.

(`rustc_errors` still depends on `rustc_hir` indirectly through
`rustc_lint_defs`; a subsequent commit will fix that.)
2025-08-20 15:01:13 -07:00
Josh Triplett
b65fab6299 Move IntoDiagArg earlier in the dependency chains
`rustc_errors` depends on numerous crates, solely to implement its
`IntoDiagArg` trait on types from those crates. Many crates depend on
`rustc_errors`, and it's on the critical path.

We can't swap things around to make all of those crates depend on
`rustc_errors` instead, because `rustc_errors` would end up in
dependency cycles.

Instead, move `IntoDiagArg` into `rustc_error_messages`, which has far
fewer dependencies, and then have most of these crates depend on
`rustc_error_messages`.

This allows `rustc_errors` to drop dependencies on several crates,
including the large `rustc_target`.

(This doesn't fully reduce dependency chains yet, as `rustc_errors`
still depends on `rustc_hir` which depends on `rustc_target`. That will
get fixed in a subsequent commit.)
2025-08-20 15:01:13 -07:00
许杰友 Jieyou Xu (Joe)
c1a1222ece
Rollup merge of #139345 - smoelius:into-iter-stability, r=lcnr
Extend `QueryStability` to handle `IntoIterator` implementations

This PR extends the `rustc::potential_query_instability` lint to check values passed as `IntoIterator` implementations.

Full disclosure: I want the lint to warn about this line (please see #138871 for why): aa8f0fd716/src/librustdoc/json/mod.rs (L261)

However, the lint warns about several other lines as well.

Final note: the functions `get_callee_generic_args_and_args` and `get_input_traits_and_projections` were copied directly from [Clippy's source code](4fd8c04da0/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs (L445-L496)).
2025-08-19 19:42:00 +08:00
Samuel Moelius
c3c2c23e0d Extend QueryStability to handle IntoIterator implementations
Fix adjacent code

Fix duplicate warning; merge test into `tests/ui-fulldeps/internal-lints`

Use `rustc_middle::ty::FnSig::inputs`

Address two review comments

- https://github.com/rust-lang/rust/pull/139345#discussion_r2109006991
- https://github.com/rust-lang/rust/pull/139345#discussion_r2109058588

Use `Instance::try_resolve`

Import `rustc_middle::ty::Ty` as `Ty` rather than `MiddleTy`

Simplify predicate handling

Add more `#[allow(rustc::potential_query_instability)]` following rebase

Remove two `#[allow(rustc::potential_query_instability)]` following rebase

Address review comment

Update compiler/rustc_lint/src/internal.rs

Co-authored-by: lcnr <rust@lcnr.de>
2025-08-15 12:10:54 -04:00
Sasha Pourcelot
51bccdd1ab Port #[custom_mir(..)] to the new attribute system 2025-08-15 11:19:29 +02:00
Jakub Beránek
18afb69767
Rollup merge of #137872 - estebank:extra-vert, r=compiler-errors
Include whitespace in "remove |" suggestion and make it hidden

Tweak error rendering of patterns with an extra `|` on either end.

Built on #137409. Only last commit is relevant.

? ``@compiler-errors``
2025-08-14 21:48:41 +02:00
Stuart Cook
907076c3dd
Rollup merge of #144558 - estebank:issue-68119, r=lcnr
Point at the `Fn()` or `FnMut()` bound that coerced a closure, which caused a move error

When encountering a move error involving a closure because the captured value isn't `Copy`, and the obligation comes from a bound on a type parameter that requires `Fn` or `FnMut`, we point at it and explain that an `FnOnce` wouldn't cause the move error.

```
error[E0507]: cannot move out of `foo`, a captured variable in an `Fn` closure
  --> f111.rs:15:25
   |
14 | fn do_stuff(foo: Option<Foo>) {
   |             ---  ----------- move occurs because `foo` has type `Option<Foo>`, which does not implement the `Copy` trait
   |             |
   |             captured outer variable
15 |     require_fn_trait(|| async {
   |                      -- ^^^^^ `foo` is moved here
   |                      |
   |                      captured by this `Fn` closure
16 |         if foo.map_or(false, |f| f.foo()) {
   |            --- variable moved due to use in coroutine
   |
help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
  --> f111.rs:12:53
   |
12 | fn require_fn_trait<F: Future<Output = ()>>(_: impl Fn() -> F) {}
   |                                                     ^^^^^^^^^
help: consider cloning the value if the performance cost is acceptable
   |
16 |         if foo.clone().map_or(false, |f| f.foo()) {
   |               ++++++++
```

Fix rust-lang/rust#68119, by pointing at `Fn` and `FnMut` bounds involved in move errors.
2025-08-11 12:21:08 +10:00
Jacob Pratt
733568ac7d
Rollup merge of #145152 - xizheyin:detect-confusion-type, r=lqd
Use `eq_ignore_ascii_case` to avoid heap alloc in `detect_confuse_type`

A small optimization has been made, using `to_ascii_lowercase()` instead of `to_lowercase().to_string()`.

r? compiler
2025-08-10 15:43:55 -04:00
Esteban Küber
1aa5668d20 Point at the Fn() or FnMut() bound that coerced a closure, which caused a move error
When encountering a move error involving a closure because the captured value isn't `Copy`, and the obligation comes from a bound on a type parameter that requires `Fn` or `FnMut`, we point at it and explain that an `FnOnce` wouldn't cause the move error.

```
error[E0507]: cannot move out of `foo`, a captured variable in an `Fn` closure
  --> f111.rs:15:25
   |
14 | fn do_stuff(foo: Option<Foo>) {
   |             ---  ----------- move occurs because `foo` has type `Option<Foo>`, which does not implement the `Copy` trait
   |             |
   |             captured outer variable
15 |     require_fn_trait(|| async {
   |                      -- ^^^^^ `foo` is moved here
   |                      |
   |                      captured by this `Fn` closure
16 |         if foo.map_or(false, |f| f.foo()) {
   |            --- variable moved due to use in coroutine
   |
help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
  --> f111.rs:12:53
   |
12 | fn require_fn_trait<F: Future<Output = ()>>(_: impl Fn() -> F) {}
   |                                                     ^^^^^^^^^
help: consider cloning the value if the performance cost is acceptable
   |
16 |         if foo.clone().map_or(false, |f| f.foo()) {
   |               ++++++++
```
2025-08-10 19:22:49 +00:00
xizheyin
cf1a1b7b76
Use eq_ignore_ascii_case to avoid heap alloc in detect_confuse_type
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-08-10 12:35:12 +08:00
Trevor Gross
804d1a194e
Rollup merge of #144579 - joshtriplett:mbe-attr, r=petrochenkov
Implement declarative (`macro_rules!`) attribute macros (RFC 3697)

This implements [RFC 3697](https://github.com/rust-lang/rust/issues/143547), "Declarative (`macro_rules!`) attribute macros".

I would suggest reading this commit-by-commit. This first introduces the
feature gate, then adds parsing for attribute rules (doing nothing with them),
then adds the ability to look up and apply `macro_rules!` attributes by path,
then adds support for local attributes, then adds a test, and finally makes
various improvements to errors.
2025-08-08 14:22:45 -05:00
Josh Triplett
2054a0c56b mbe: In error messages, don't assume attributes are always proc macros
Now that `macro_rules` macros can define attribute rules, make sure
error messages account for that.
2025-08-08 10:35:47 -07:00
Esteban Küber
99196657fc Use tcx.short_string() in more diagnostics
`TyCtxt::short_string` ensures that user visible type paths aren't overwhelming on the terminal output, and properly saves the long name to disk as a side-channel. We already use these throughout the compiler and have been using them as needed when users find cases where the output is verbose. This is a proactive search of some cases to use `short_string`.

We add support for shortening the path of "trait path only".

Every manual use of `short_string` is a bright marker that that error should be using structured diagnostics instead (as they have proper handling of long types without the maintainer having to think abou tthem).

When we don't actually print out a shortened type we don't need the "use `--verbose`" note.

On E0599 show type identity to avoid expanding the receiver's generic parameters.

Unify wording on `long_ty_path` everywhere.
2025-08-07 21:18:00 +00:00
Esteban Küber
2db126d651 Include whitespace in "remove |" suggestion and make it hidden 2025-08-04 18:06:18 +00:00
Jacob Pratt
c7ec9bcc6e
Rollup merge of #144691 - xizheyin:suggest-confuse, r=estebank
Extend `is_case_difference` to handle digit-letter confusables

This PR extends `is_case_difference` to handle digit-letter confusables

Add support for detecting 0/O, 1/l, 5/S, 8/B, 9/g confusables in error suggestions.

r? `@estebank`
2025-08-01 00:38:20 -04:00
Jana Dönszelmann
e2ae91b74a
Rollup merge of #144733 - Muscraft:secondary-file-sigil, r=compiler-errors
fix: Match width of ascii and unicode secondary file start

The current [unicode secondary file start](64ca23b623/compiler/rustc_errors/src/emitter.rs (L2991)) is only three characters, whereas the ASCII variant and normal [file start](64ca23b623/compiler/rustc_errors/src/emitter.rs (L2983-L2984)) are four characters. This slight difference caused the paths following a Unicode secondary file start to not align with other structured elements.
2025-07-31 17:19:41 +02:00
Scott Schafer
935fdb6980
fix: Match width of ascii and unicode secondary file start 2025-07-31 07:26:39 -06:00
Jana Dönszelmann
e1d3ad89c7
remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
Scott Schafer
761c4e308c
fix: Only "close the window" when its the last annotated file 2025-07-31 00:25:09 -06:00
xizheyin
7b667e7811
Extend is_case_difference to handle digit-letter confusables
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-31 13:55:59 +08:00
Scott Schafer
aa9767290e
feat: Right align line numbers 2025-07-28 16:32:11 -06:00
bors
d242a8bd5a Auto merge of #144469 - Kivooeo:chains-cleanup, r=SparrowLii
Some `let chains` clean-up

Not sure if this kind of clean-up is welcoming because of size, but I decided to try out one

r? compiler
2025-07-28 05:25:23 +00:00
Kivooeo
43725ed819 use let chains in ast, borrowck, codegen, const_eval 2025-07-28 06:08:48 +05:00
Cameron Steffen
b8d628c1e1 Use LocalKey<Cell> methods more 2025-07-24 13:21:25 -05:00
xizheyin
c58e0bd093
rename emit_unless to emit_unless_delay
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-19 01:49:19 +08:00
Matthias Krüger
140f2fa5ae
Rollup merge of #143661 - Muscraft:other-suggestion-message, r=estebank
chore: Improve how the other suggestions message gets rendered

Note: This change is part of my ongoing work to use `annotate-snippets` as `rustc`'s emitter

This change started as a way to remove some specialty code paths from `annotate-snippets`, by making the "and {} other candidates" message get rendered like a secondary message with no level, but turned into a fix for the message's Unicode output. Before this change, when using the Unicode output, the other suggestions message would get rendered outside of the main suggestion block, making it feel disconnected from what it was referring to. This change makes it so that the message is on the last line of the block, aligning its rendering with other secondary messages, and making it clear what the message is referring to.

Before:
```
error[E0433]: failed to resolve: use of undeclared type `IntoIter`
   ╭▸ $DIR/issue-82956.rs:28:24
   │
LL │         let mut iter = IntoIter::new(self);
   │                        ━━━━━━━━ use of undeclared type `IntoIter`
   ╰╴
help: consider importing one of these structs
   ╭╴
LL + use std::array::IntoIter;
   ├╴
LL + use std::collections::binary_heap::IntoIter;
   ├╴
LL + use std::collections::btree_map::IntoIter;
   ├╴
LL + use std::collections::btree_set::IntoIter;
   ╰╴
     and 9 other candidates
```

After:
```
error[E0433]: failed to resolve: use of undeclared type `IntoIter`
   ╭▸ $DIR/issue-82956.rs:28:24
   │
LL │         let mut iter = IntoIter::new(self);
   │                        ━━━━━━━━ use of undeclared type `IntoIter`
   ╰╴
help: consider importing one of these structs
   ╭╴
LL + use std::array::IntoIter;
   ├╴
LL + use std::collections::binary_heap::IntoIter;
   ├╴
LL + use std::collections::btree_map::IntoIter;
   ├╴
LL + use std::collections::btree_set::IntoIter;
   │
   ╰ and 9 other candidates
```
2025-07-11 07:35:20 +02:00
Esteban Küber
0674eca2f0 Make Diag::multipart_suggestions always verbose 2025-07-10 17:23:29 +00:00
Scott Schafer
d67bf6095a
chore: Improve how the other suggestions message gets rendered 2025-07-10 08:00:20 -06:00
yukang
93db9e7ee0 Remove uncessary parens in closure body with unused lint 2025-07-10 09:25:56 +08:00
bors
a2d45f73c7 Auto merge of #143601 - matthiaskrgr:rollup-9iw2sqk, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#132469 (Do not suggest borrow that is already there in fully-qualified call)
 - rust-lang/rust#143340 (awhile -> a while where appropriate)
 - rust-lang/rust#143438 (Fix the link in `rustdoc.md`)
 - rust-lang/rust#143539 (Regression tests for repr ICEs)
 - rust-lang/rust#143566 (Fix `x86_64-unknown-netbsd` platform support page)
 - rust-lang/rust#143572 (Remove unused allow attrs)
 - rust-lang/rust#143583 (`loop_match`: fix 'no terminator on block')
 - rust-lang/rust#143584 (make `Machine::load_mir` infallible)
 - rust-lang/rust#143591 (Fix missing words in future tracking issue)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-07 20:30:53 +00:00
Yotam Ofek
3b48407f93 Remove unused allow attrs 2025-07-07 12:58:16 +00:00
Edoardo Marangoni
93f1201c06
compiler: Parse p- specs in datalayout string, allow definition of custom default data address space 2025-07-07 09:04:53 +02:00
Matthias Krüger
8e4cca85b5
Rollup merge of #143417 - klensy:termize, r=jieyouxu
bump termize dep

Bumps termize to drop one more winapi dep. Only change is really moving from winapi: https://github.com/JohnTitor/termize/releases/tag/v0.2.0

Clippy depends on termize 0.1.1, https://github.com/rust-lang/rust-clippy/pull/15207
2025-07-04 16:22:37 +02:00
Matthias Krüger
324aa5d4ba
Rollup merge of #143286 - Muscraft:track-diagnostics-note, r=WaffleLapkin
Make -Ztrack-diagnostics emit like a note

[#t-compiler/diagnostics > Rendering -Ztrack-diagnostics like a note](https://rust-lang.zulipchat.com/#narrow/channel/147480-t-compiler.2Fdiagnostics/topic/Rendering.20-Ztrack-diagnostics.20like.20a.20note/with/526608647)

As discussed on the Zulip thread above, I want to make `-Ztrack-diagnostics` emit like a `note`. This is because I find its current output jarring, and the fact that it gets rendered completely left-aligned, [even in the middle of a snippet](86e05cd300/tests/ui/track-diagnostics/track6.stderr), seems like something that should be changed. Turning it into a `note` seems like the best choice, as it would align it with the rest of the output, and `note` is already used for somewhat similar things, like seeing why a lint was fired.

---

Note: turning `-Ztrack-diagnostics` into a `note` will also make `annotate-snippets` API a bit cleaner
2025-07-04 16:22:35 +02:00
klensy
e631555a48 bump termize dep 2025-07-04 11:43:43 +03:00
Scott Schafer
6bef238b63
refactor: Make -Ztrack-diagnostics emit like a note 2025-07-03 07:19:25 -06:00
klensy
c76d032f01 setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
Josh Stone
e851e3e16e Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
Matthias Krüger
3944c8ce44
Rollup merge of #143264 - Muscraft:fix-suggestion-filename, r=compiler-errors
fix: Emit suggestion filename if primary diagnostic span is dummy

While working on using `annotate-snippets` as `rustc`'s emitter, I came across [`tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr`](b03b3a7ec9/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr), which lacked a filename for both the annotation and the suggestion, which seemed like a bug to me. After some investigation, I found that this is happening because the primary span is a dummy, so its filename doesn't get output, and its filename matches the one for the suggestion, so the suggestion's filename doesn't get output. To fix this issue, I made it so that the filename for a suggestion will get output if the primary span is a dummy.
2025-07-01 04:25:38 +02:00
Scott Schafer
c8fac7779e
fix: Emit suggestion filename if primary diagnostic span is dummy 2025-06-30 19:24:22 -06:00
Dan Johnson
4e83298ae8 linkify CodeSuggestion in doc comments 2025-06-30 16:00:18 -07:00
Jana Dönszelmann
63c5a84b74
Rollup merge of #142724 - xizheyin:avoid_overwrite_args, r=oli-obk
Add runtime check to avoid overwrite arg in `Diag`

## Origin PR description
At first, I set up a `debug_assert` check for the arg method to make sure that `args` in `Diag` aren't easily overwritten, and I added the `remove_arg()` method, so that if you do need to overwrite an arg, then you can explicitly call `remove_arg()` to remove it first, then call `arg()` to overwrite it.

For the code before the rust-lang/rust#142015 change, it won't compile because it will report an error
```
arg `instance`already exists.
```

This PR also modifies all diagnostics that fail the check to pass the check. There are two cases of check failure:

1. ~~Between *the parent diagnostic and the subdiagnostic*, or *between the subdiagnostics* have the same field between them. In this case, I renamed the conflicting fields.~~
2. ~~For subdiagnostics stored in `Vec`, the rendering may iteratively write the same arg over and over again. In this case, I changed the auto-generation with `derive(SubDiagnostic)` to manually implementing `SubDiagnostic` and manually rendered it with `eagerly_translate()`, similar to https://github.com/rust-lang/rust/issues/142031#issuecomment-2984812090, and after rendering it I manually deleted useless arg with the newly added `remove_arg` method.~~

## Final Decision

After trying and discussing, we made a final decision.

For `#[derive(Subdiagnostic)]`, This PR made two changes:

1. After the subdiagnostic is rendered, remove all args of this subdiagnostic, which allows for usage like `Vec<Subdiag>`.
2. Store `diag.args` before setting arguments, so that you can restore the contents of the main diagnostic after deleting the arguments after subdiagnostic is rendered, to avoid deleting the main diagnostic's arg when they have the same name args.
2025-06-25 22:14:55 +02:00
xizheyin
d2d17c60bd
Add runtime check to avoid overwrite arg easily in diag and store and restore snapshot when set subdiag arg
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-25 21:07:16 +08:00
Jubilee
8ba69d0f95
Rollup merge of #142784 - Kobzol:timings-codegen, r=nnethercote
Add codegen timing section

And since we now start and end the sections also using separate functions, also add some light checking if we're generating the sections correctly.

I'm integrating `--timings` into Cargo, and I realized that the codegen timings would be quite useful for that. Frontend can be computed simply as `[start of compilation, start of codegen]` for now.

r? `@nnethercote`
2025-06-23 12:48:20 -07:00
Jakub Beránek
332ae3b7e6
Add codegen timing section 2025-06-23 08:50:17 +02:00
Cameron Steffen
3388d83785 Extract SilentEmitter 2025-06-19 13:05:01 -05:00
Cameron Steffen
316f63bc48 Rename SilentEmitter -> FatalOnlyEmitter 2025-06-19 13:03:17 -05:00
Cameron Steffen
07b9bb1855 Extract Translator struct 2025-06-19 13:02:04 -05:00
Urgau
2011ab5152
Rollup merge of #142123 - Kobzol:timings, r=nnethercote
Implement initial support for timing sections (`--json=timings`)

This PR implements initial support for emitting high-level compilation section timings. The idea is to provide a very lightweight way of emitting durations of various compilation sections (frontend, backend, linker, or on a more granular level macro expansion, typeck, borrowck, etc.). The ultimate goal is to stabilize this output (in some form), make Cargo pass `--json=timings` and then display this information in the HTML output of `cargo build --timings`, to make it easier to quickly profile "what takes so long" during the compilation of a Cargo project. I would personally also like if Cargo printed some of this information in the interactive `cargo build` output, but the `build --timings` use-case is the main one.

Now, this information is already available with several other sources, but I don't think that we can just use them as they are, which is why I proposed a new way of outputting this data (`--json=timings`):
- This data is available under `-Zself-profile`, but that is very expensive and forever unstable. It's just a too big of a hammer to tell us the duration it took to run the linker.
- It could also be extracted with `-Ztime-passes`. That is pretty much "for free" in terms of performance, and it can be emitted in a structured form to JSON via `-Ztime-passes-format=json`. I guess that one alternative might be to stabilize this flag in some form, but that form might just be `--json=timings`? I guess what we could do in theory is take the already emitted time passes and reuse them for `--json=timings`. Happy to hear suggestions!

I'm sending this PR mostly for a vibeck, to see if the way I implemented it is passable. There are some things to figure out:
- How do we represent the sections? Originally I wanted to output `{ section, duration }`, but then I realized that it might be more useful to actually emit `start` and `end` events. Both because it enables to see the output incrementally (in case compilation takes a long time and you read the outputs directly, or Cargo decides to show this data in `cargo build` some day in the future), and because it makes it simpler to represent hierarchy (see below). The timestamps currently emit microseconds elapsed from a predetermined point in time (~start of rustc), but otherwise they are fully opaque, and should be only ever used to calculate the duration using `end - start`. We could also precompute the duration for the user in the `end` event, but that would require doing more work in rustc, which I would ideally like to avoid :P
- Do we want to have some form of hierarchy? I think that it would be nice to show some more granular sections rather than just frontend/backend/linker (e.g. macro expansion, typeck and borrowck as a part of the frontend). But for that we would need some way of representing hierarchy. A simple way would be something like `{ parent: "frontend" }`, but I realized that with start/end timestamps we get the hierarchy "for free", only the client will need to reconstruct it from the order of start/end events (e.g. `start A`, `start B` means that `B` is a child of `A`).
- What exactly do we want to stabilize? This is probably a question for later. I think that we should definitely stabilize the format of the emitted JSON objects, and *maybe* some specific section names (but we should also make it clear that they can be missing, e.g. you don't link everytime you invoke `rustc`).

The PR be tested e.g. with `rustc +stage1 src/main.rs --json=timings --error-format=json -Zunstable-options` on a crate without dependencies (it is not easy to use `--json` with stock Cargo, because it also passes this flag to `rustc`, so this will later need Cargo integration to be usable with it).

Zulip discussions: [#t-compiler > Outputting time spent in various compiler sections](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Outputting.20time.20spent.20in.20various.20compiler.20sections/with/518850162)

MCP: https://github.com/rust-lang/compiler-team/issues/873

r? ``@nnethercote``
2025-06-18 19:40:32 +02:00