Skip to content

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

Open
madsmtm wants to merge 1 commit intorust-lang:mainfrom
madsmtm:fix-eq-derive-comptime-regression
Open

Re-add #[inline] to Eq::assert_fields_are_eq#153157
madsmtm wants to merge 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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