Skip to content

Re-add #[inline] to Eq::assert_fields_are_eq#153157

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
madsmtm:fix-eq-derive-comptime-regression
Mar 2, 2026
Merged

Re-add #[inline] to Eq::assert_fields_are_eq#153157
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
madsmtm:fix-eq-derive-comptime-regression

Conversation

@madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Feb 26, 2026

Fixes a compile-time regression in #149978: non-inline methods are generally codegen'd while inline methods are deferred (and this function should never be called, so deferring is the right choice).

r? JonathanBrouwer
CC @cyrgani

@rustbot
Copy link
Collaborator

rustbot commented Feb 26, 2026

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 Feb 26, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 26, 2026

JonathanBrouwer is currently at their maximum review capacity.
They may take a while to respond.

@madsmtm
Copy link
Contributor Author

madsmtm commented Feb 26, 2026

@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 Feb 26, 2026
…<try>

Re-add `#[inline]` to `Eq::assert_fields_are_eq`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 26, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 27, 2026

☀️ Try build successful (CI)
Build commit: 980e383 (980e38374c34e1b7ebef50d22d62e6e0b482cbdc, parent: 6a979b3e32522049d0acb4a47f7ae44b7c8abfd5)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (980e383): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@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
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
-0.5% [-0.9%, -0.3%] 3
Improvements ✅
(secondary)
-2.5% [-5.6%, -0.3%] 5
All ❌✅ (primary) -0.5% [-0.9%, -0.3%] 3

Max RSS (memory usage)

Results (primary -2.7%, secondary -5.3%)

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

mean range count
Regressions ❌
(primary)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.8% [-7.2%, -1.3%] 5
Improvements ✅
(secondary)
-5.3% [-7.7%, -2.8%] 5
All ❌✅ (primary) -2.7% [-7.2%, 2.7%] 6

Cycles

Results (primary -2.3%, secondary -2.9%)

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)
- - 0
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Binary size

Results (primary -0.3%, secondary -2.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.5%, 0.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-1.3%, -0.0%] 31
Improvements ✅
(secondary)
-2.7% [-11.3%, -0.1%] 15
All ❌✅ (primary) -0.3% [-1.3%, 0.5%] 32

Bootstrap: 484.473s -> 480.523s (-0.82%)
Artifact size: 397.64 MiB -> 395.62 MiB (-0.51%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Feb 27, 2026
Copy link
Contributor

@JonathanBrouwer JonathanBrouwer left a comment

Choose a reason for hiding this comment

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

r=me after addressing nnethercotes comment

View changes since this review

@JonathanBrouwer
Copy link
Contributor

@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 Feb 27, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 27, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

Fixes a compile-time regressions, non-inline methods are generally
codegen'd while inline methods are deferred (and this should never be
called, so deferring is the right choice).
@madsmtm madsmtm force-pushed the fix-eq-derive-comptime-regression branch from cfc24b4 to 1001c0e Compare February 27, 2026 10:50
@madsmtm
Copy link
Contributor Author

madsmtm commented Feb 27, 2026

@bors r=JonathanBrouwer

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 27, 2026

📌 Commit 1001c0e has been approved by JonathanBrouwer

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 27, 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 Mar 2, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 2, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 52m 58s
Pushing ddd36bd to main...

@rust-bors rust-bors bot merged commit ddd36bd into rust-lang:main Mar 2, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

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 e7d90c6 (parent) -> ddd36bd (this PR)

Test differences

Show 1 test diff

1 doctest diff were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard ddd36bd57051f796850345b76c17e9402e28a9e4 --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. dist-x86_64-apple: 2h 25m -> 2h 1m (-16.4%)
  2. dist-aarch64-msvc: 1h 37m -> 1h 50m (+13.0%)
  3. dist-aarch64-apple: 2h 12m -> 1h 56m (-11.7%)
  4. dist-arm-linux-musl: 1h 30m -> 1h 39m (+9.2%)
  5. dist-x86_64-llvm-mingw: 1h 46m -> 1h 55m (+8.9%)
  6. x86_64-gnu: 2h 19m -> 2h 7m (-8.8%)
  7. dist-ohos-x86_64: 1h 21m -> 1h 14m (-8.8%)
  8. dist-aarch64-llvm-mingw: 1h 46m -> 1h 37m (-8.2%)
  9. i686-msvc-1: 3h 2m -> 2h 47m (-8.0%)
  10. i686-gnu-nopt-2: 2h 15m -> 2h 4m (-7.9%)
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
Collaborator

Finished benchmarking commit (ddd36bd): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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
Regressions ❌
(secondary)
0.2% [0.2%, 0.3%] 3
Improvements ✅
(primary)
-0.5% [-0.8%, -0.3%] 4
Improvements ✅
(secondary)
-3.0% [-5.6%, -0.4%] 4
All ❌✅ (primary) -0.5% [-0.8%, -0.3%] 4

Max RSS (memory usage)

Results (primary -3.9%, secondary -3.8%)

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

mean range count
Regressions ❌
(primary)
3.1% [3.1%, 3.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.7% [-7.2%, -3.3%] 4
Improvements ✅
(secondary)
-3.8% [-4.5%, -2.5%] 3
All ❌✅ (primary) -3.9% [-7.2%, 3.1%] 5

Cycles

Results (secondary -4.5%)

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-4.5%, -4.5%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.3%, secondary -2.9%)

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)
- - 0
Improvements ✅
(primary)
-0.3% [-1.3%, -0.0%] 34
Improvements ✅
(secondary)
-2.9% [-11.3%, -0.1%] 14
All ❌✅ (primary) -0.3% [-1.3%, -0.0%] 34

Bootstrap: 480.149s -> 478.623s (-0.32%)
Artifact size: 396.96 MiB -> 397.00 MiB (0.01%)

@madsmtm madsmtm deleted the fix-eq-derive-comptime-regression branch March 2, 2026 08:50
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. 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.

5 participants