Skip to content

Implement Debug for C-like enums with a concatenated string - #155452

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
makai410:enum-debug-array
Aug 3, 2026
Merged

Implement Debug for C-like enums with a concatenated string#155452
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
makai410:enum-debug-array

Conversation

@makai410

@makai410 makai410 commented Apr 17, 2026

Copy link
Copy Markdown
Member

View all comments

Fixes: #133945

Related to: #88793 #114106

Continuation of: #109615 #114190

This optimizes the expansion of derive(Debug) for C-like enums with 10 or more variants to:

fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
    const __NAMES: &str =
        "AAAAABBBBCCDDDDDDDDEFFFFFFFFFFFFFGGGGGGHatsuneIIIIIIIJJJJJJJJJ";
    const __OFFSET: [usize; 11] =
        [0usize, 5usize, 9usize, 11usize, 19usize, 20usize, 33usize,
                39usize, 46usize, 53usize, 62usize];
    let __d = ::core::intrinsics::discriminant_value(self) as usize;
    ::core::fmt::Formatter::debug_c_like_enum_write_str(f, __NAMES,
        &__OFFSET, __d)
}

The number 10 was decided based on both the rustc perf result and the results from the dedicated perf tool for this scenario:

chart-link chart-obj

See https://codeberg.org/makai410/debug-fmt-perf for more details.

r? @ghost (I want to see the perf first)

@rustbot

rustbot commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

Changes to the code generated for builtin derived traits.

cc @nnethercote

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 17, 2026
@makai410

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 17, 2026
Implement `Debug` for C-like enums with a concatenated string
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 17, 2026
@rust-bors

rust-bors Bot commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 5a131e3 (5a131e34e34187b36455f6f6809f9cd14e7ab55f, parent: e9e32aca5a4ffd08cbc29547b039d64b92a2c03b)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5a131e3): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.4% [0.2%, 2.4%] 50
Regressions ❌
(secondary)
0.9% [0.2%, 1.6%] 9
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 2
All ❌✅ (primary) 0.4% [-0.4%, 2.4%] 51

Max RSS (memory usage)

Results (primary -3.6%, secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.6% [1.2%, 6.0%] 5
Improvements ✅
(primary)
-3.6% [-5.4%, -2.5%] 4
Improvements ✅
(secondary)
-4.4% [-6.3%, -1.6%] 3
All ❌✅ (primary) -3.6% [-5.4%, -2.5%] 4

Cycles

Results (primary 2.8%, secondary 2.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.8% [2.8%, 2.8%] 1

Binary size

Results (primary 0.4%, secondary 0.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.5% [0.0%, 1.4%] 26
Regressions ❌
(secondary)
0.7% [0.1%, 1.1%] 8
Improvements ✅
(primary)
-0.7% [-1.1%, -0.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [-1.1%, 1.4%] 28

Bootstrap: 492.421s -> 491.503s (-0.19%)
Artifact size: 394.25 MiB -> 394.27 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 18, 2026
Comment thread compiler/rustc_builtin_macros/src/deriving/debug.rs Outdated
@makai410

Copy link
Copy Markdown
Member Author

There was a leftover condition from an earlier PR that I pulled in without a proper review, such that it actually didn't apply the optimization to large enums <_<;

I also want to try skipping bounds checks. I suppose it could improve runtime performance, at least on my machine, based on some pretty rough benchmarks with an enum of 10,000 variants.

@makai410

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 18, 2026
Implement `Debug` for C-like enums with a concatenated string
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 18, 2026
@nnethercote nnethercote self-assigned this Apr 18, 2026
@nnethercote

Copy link
Copy Markdown
Contributor

I'm happy to review this once it's ready.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 18, 2026
Comment on lines +284 to +288
let variant_names = def
.variants
.iter()
.map(|v| v.disr_expr.is_none().then_some(v.ident.name.as_str()))
.collect::<Option<ThinVec<_>>>()?;

@makai410 makai410 Apr 18, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I think I missed a valid case, considering:

enum Uwu {
    QwQ = 0,
    AwA = 1,
}

which has explicit discriminants but is actually dense.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we can use an offset when some variants have negative discriminants while the overall variants remain dense.

I'll do a follow-up PR to implement these.

@rust-bors

rust-bors Bot commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 7348f26 (7348f264e27b4bbcab21ed426532865b98fc5f55, parent: 8da2d28cbd5a4e2b93e028e709afe09541671663)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (7348f26): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.5% [0.2%, 7.1%] 50
Regressions ❌
(secondary)
1.2% [0.2%, 4.1%] 12
Improvements ✅
(primary)
-0.6% [-0.6%, -0.6%] 2
Improvements ✅
(secondary)
-0.2% [-0.5%, -0.0%] 13
All ❌✅ (primary) 0.5% [-0.6%, 7.1%] 52

Max RSS (memory usage)

Results (primary 0.7%, secondary 0.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.2% [1.8%, 6.9%] 5
Regressions ❌
(secondary)
2.4% [0.8%, 6.1%] 10
Improvements ✅
(primary)
-5.6% [-7.2%, -3.9%] 2
Improvements ✅
(secondary)
-5.6% [-6.3%, -4.8%] 3
All ❌✅ (primary) 0.7% [-7.2%, 6.9%] 7

Cycles

Results (primary 4.4%, secondary 3.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.4% [4.4%, 4.4%] 1
Regressions ❌
(secondary)
3.2% [1.8%, 5.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.4% [4.4%, 4.4%] 1

Binary size

Results (primary 0.4%, secondary 1.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.6% [0.1%, 1.5%] 20
Regressions ❌
(secondary)
1.0% [0.1%, 2.1%] 20
Improvements ✅
(primary)
-0.3% [-0.5%, -0.0%] 8
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [-0.5%, 1.5%] 28

Bootstrap: 493.313s -> 504.472s (2.26%)
Artifact size: 394.36 MiB -> 394.34 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 18, 2026
@theemathas

Copy link
Copy Markdown
Contributor

This will probably run into #148423. Furthermore, I believe this is likely to cause unsoundness in actual programs, due to the enumflags2 crate which I think has a macro that modifies the discriminant values of enums.

@hanna-kruppe

Copy link
Copy Markdown
Contributor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 25, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 25, 2026
Implement `Debug` for C-like enums with a concatenated string
@rust-bors

rust-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: b5d9a4c (b5d9a4ca70a16905acc6881bb36b6fc5aae504f2)
Base parent: da86f4d (da86f4d0726be475afbbffe40cb2f65741c51ad3)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (b5d9a4c): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-0.7%, -0.7%] 1
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.2%] 12
All ❌✅ (primary) -0.7% [-0.7%, -0.7%] 1

Max RSS (memory usage)

Results (primary 4.2%, secondary 5.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.2% [4.2%, 4.2%] 1
Regressions ❌
(secondary)
5.8% [5.8%, 5.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.2% [4.2%, 4.2%] 1

Cycles

Results (primary 2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.8% [2.8%, 2.8%] 1

Binary size

Results (primary 0.1%, secondary 1.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.7% [0.5%, 0.9%] 8
Regressions ❌
(secondary)
1.2% [0.4%, 1.8%] 14
Improvements ✅
(primary)
-0.2% [-0.5%, -0.1%] 14
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-0.5%, 0.9%] 22

Bootstrap: 489.287s -> 489.11s (-0.04%)
Artifact size: 387.73 MiB -> 387.61 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 25, 2026
@makai410

Copy link
Copy Markdown
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 30, 2026

@nnethercote nnethercote left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy for this to be merged, but we should keep an eye out for any problems of the kind described in #148423.

View changes since this review

@nnethercote

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5d12b9b has been approved by nnethercote

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 2, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 3, 2026
@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: nnethercote
Duration: 3h 7m 24s
Pushing 22057b8 to main...

@rust-bors
rust-bors Bot merged commit 22057b8 into rust-lang:main Aug 3, 2026
15 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 11177f2 (parent) -> 22057b8 (this PR)

Test differences

Show 22 test diffs

22 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 22057b88b091743bc0fd8d592a9264f0a6951403 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. test-various: 1h 17m -> 2h 19m (+79.1%)
  2. x86_64-gnu-gcc: 46m 39s -> 1h 11m (+53.4%)
  3. dist-loongarch64-linux: 1h 21m -> 1h 55m (+41.1%)
  4. tidy: 4m 8s -> 2m 40s (-35.5%)
  5. dist-x86_64-netbsd: 1h 6m -> 1h 29m (+35.4%)
  6. x86_64-gnu-llvm-21: 39m 51s -> 53m 3s (+33.1%)
  7. dist-x86_64-illumos: 1h 25m -> 1h 52m (+31.9%)
  8. x86_64-gnu: 2h 34m -> 1h 49m (-29.1%)
  9. dist-x86_64-mingw: 2h 8m -> 2h 44m (+28.6%)
  10. dist-armv7-linux: 1h 11m -> 1h 31m (+27.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (22057b8): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.7% [0.7%, 0.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.7%, -0.2%] 13
All ❌✅ (primary) 0.7% [0.7%, 0.7%] 1

Max RSS (memory usage)

Results (primary 1.3%, secondary 0.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.9% [1.2%, 6.4%] 3
Regressions ❌
(secondary)
2.4% [1.7%, 3.1%] 2
Improvements ✅
(primary)
-1.2% [-2.2%, -0.5%] 3
Improvements ✅
(secondary)
-0.7% [-1.4%, -0.5%] 5
All ❌✅ (primary) 1.3% [-2.2%, 6.4%] 6

Cycles

Results (primary -0.2%, secondary 0.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.0% [0.4%, 2.1%] 5
Regressions ❌
(secondary)
1.9% [0.4%, 3.9%] 12
Improvements ✅
(primary)
-1.0% [-3.3%, -0.5%] 7
Improvements ✅
(secondary)
-1.5% [-4.0%, -0.4%] 8
All ❌✅ (primary) -0.2% [-3.3%, 2.1%] 12

Binary size

Results (primary 0.1%, secondary 1.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.5% [0.1%, 0.9%] 12
Regressions ❌
(secondary)
1.2% [0.4%, 1.8%] 14
Improvements ✅
(primary)
-0.2% [-0.4%, -0.0%] 17
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-0.4%, 0.9%] 29

Bootstrap: 489.287s -> 490.286s (0.20%)
Artifact size: 390.32 MiB -> 390.24 MiB (-0.02%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 3, 2026
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Aug 3, 2026
Implement `Debug` for C-like enums with a concatenated string



Fixes: rust-lang/rust#133945 

Related to: rust-lang/rust#88793 rust-lang/rust#114106

Continuation of: rust-lang/rust#109615 rust-lang/rust#114190 

This optimizes the expansion of `derive(Debug)` for C-like enums with 10 or more variants to:
```rust
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
    const __NAMES: &str =
        "AAAAABBBBCCDDDDDDDDEFFFFFFFFFFFFFGGGGGGHatsuneIIIIIIIJJJJJJJJJ";
    const __OFFSET: [usize; 11] =
        [0usize, 5usize, 9usize, 11usize, 19usize, 20usize, 33usize,
                39usize, 46usize, 53usize, 62usize];
    let __d = ::core::intrinsics::discriminant_value(self) as usize;
    ::core::fmt::Formatter::debug_c_like_enum_write_str(f, __NAMES,
        &__OFFSET, __d)
}
```

The number 10 was decided based on both [the rustc perf result](rust-lang/rust#155452 (comment)) and the results from the dedicated perf tool for this scenario:

<img width="1920" height="1280" alt="chart-link" src="https://github.com/user-attachments/assets/1327ee63-ce05-482b-a1fd-c56e919250ea" />
<img width="1920" height="1280" alt="chart-obj" src="https://github.com/user-attachments/assets/1cb831d3-c9dc-469f-b87d-03cf633f8335" />


See https://codeberg.org/makai410/debug-fmt-perf for more details.

r? @ghost (I want to see the perf first)
@panstromek

Copy link
Copy Markdown
Contributor

perf triage:

cranelift-codegen regression is probably unrelated, because it wasn't present in the pre-merge results (it was actually an improvement there). Looks like a codegen unit scheduling change, based on the graph.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Aug 3, 2026
WhySoBad pushed a commit to WhySoBad/miri that referenced this pull request Aug 5, 2026
Implement `Debug` for C-like enums with a concatenated string



Fixes: rust-lang/rust#133945 

Related to: rust-lang/rust#88793 rust-lang/rust#114106

Continuation of: rust-lang/rust#109615 rust-lang/rust#114190 

This optimizes the expansion of `derive(Debug)` for C-like enums with 10 or more variants to:
```rust
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
    const __NAMES: &str =
        "AAAAABBBBCCDDDDDDDDEFFFFFFFFFFFFFGGGGGGHatsuneIIIIIIIJJJJJJJJJ";
    const __OFFSET: [usize; 11] =
        [0usize, 5usize, 9usize, 11usize, 19usize, 20usize, 33usize,
                39usize, 46usize, 53usize, 62usize];
    let __d = ::core::intrinsics::discriminant_value(self) as usize;
    ::core::fmt::Formatter::debug_c_like_enum_write_str(f, __NAMES,
        &__OFFSET, __d)
}
```

The number 10 was decided based on both [the rustc perf result](rust-lang/rust#155452 (comment)) and the results from the dedicated perf tool for this scenario:

<img width="1920" height="1280" alt="chart-link" src="https://github.com/user-attachments/assets/1327ee63-ce05-482b-a1fd-c56e919250ea" />
<img width="1920" height="1280" alt="chart-obj" src="https://github.com/user-attachments/assets/1cb831d3-c9dc-469f-b87d-03cf633f8335" />


See https://codeberg.org/makai410/debug-fmt-perf for more details.

r? @ghost (I want to see the perf first)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiling #[derive(Debug)] enum + dbg! is quadratic with enum variants

8 participants