Skip to content

Conversation

@cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Oct 16, 2025

Part of #146411

Fixes #119729
Keeps #136175 as it involves offset_of! which this PR does not touch.

r? @ghost

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 16, 2025
@rust-log-analyzer

This comment has been minimized.

@cjgillot
Copy link
Contributor Author

@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 Oct 16, 2025
rust-bors bot added a commit that referenced this pull request Oct 16, 2025
Replace NullOp::SizeOf and NullOp::AlignOf by lang items.
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 17, 2025

☀️ Try build successful (CI)
Build commit: 2cefd8f (2cefd8ff4961f18771f6f840878942cbfbc03afe, parent: 53a741fc4b8cf2d8e7b1b2336ed8edf889db84f4)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2cefd8f): 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.5% [0.4%, 0.6%] 3
Regressions ❌
(secondary)
0.7% [0.5%, 0.7%] 4
Improvements ✅
(primary)
-0.2% [-0.2%, -0.1%] 2
Improvements ✅
(secondary)
-0.2% [-0.7%, -0.1%] 14
All ❌✅ (primary) 0.2% [-0.2%, 0.6%] 5

Max RSS (memory usage)

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

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

mean range count
Regressions ❌
(primary)
1.5% [0.4%, 3.0%] 8
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.4% [-7.6%, -1.1%] 5
Improvements ✅
(secondary)
-1.4% [-2.2%, -0.8%] 3
All ❌✅ (primary) -0.3% [-7.6%, 3.0%] 13

Cycles

Results (primary -2.9%, secondary 6.8%)

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

Binary size

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

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.5%] 22
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 11
Improvements ✅
(primary)
-0.2% [-0.8%, -0.0%] 18
Improvements ✅
(secondary)
-1.2% [-3.2%, -0.3%] 4
All ❌✅ (primary) -0.0% [-0.8%, 0.5%] 40

Bootstrap: 475.105s -> 474.369s (-0.15%)
Artifact size: 390.35 MiB -> 390.39 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 Oct 17, 2025
@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Oct 17, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@cjgillot cjgillot force-pushed the no-null-op branch 2 times, most recently from fca4c69 to 27154a0 Compare October 17, 2025 17:59
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Oct 23, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@cjgillot
Copy link
Contributor Author

@bors r=scottmcm,oli-obk

@bors
Copy link
Collaborator

bors commented Oct 23, 2025

📌 Commit 5dfbf67 has been approved by scottmcm,oli-obk

It is now in the queue for this repository.

@bors bors 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 Oct 23, 2025
@bors
Copy link
Collaborator

bors commented Oct 23, 2025

⌛ Testing commit 5dfbf67 with merge 4b3ba58...

@bors
Copy link
Collaborator

bors commented Oct 23, 2025

☀️ Test successful - checks-actions
Approved by: scottmcm,oli-obk
Pushing 4b3ba58 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 23, 2025
@bors bors merged commit 4b3ba58 into rust-lang:master Oct 23, 2025
12 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 23, 2025
@github-actions
Copy link
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 7838ce1 (parent) -> 4b3ba58 (this PR)

Test differences

Show 52 test diffs

Stage 1

  • [crashes] tests/crashes/114663.rs: pass -> [missing] (J1)
  • [crashes] tests/crashes/119729.rs: pass -> [missing] (J1)
  • [crashes] tests/crashes/136175.rs: pass -> [missing] (J1)
  • [ui] tests/ui/const-generics/generic_const_exprs/size_of-dyn-trait-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/generic_const_exprs/size_of-dyn-trait-3.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/generic_const_exprs/size_of-dyn-trait.rs: [missing] -> pass (J1)

Stage 2

  • [crashes] tests/crashes/114663.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/119729.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/136175.rs: pass -> [missing] (J0)
  • [ui] tests/ui/const-generics/generic_const_exprs/size_of-dyn-trait-2.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/generic_const_exprs/size_of-dyn-trait-3.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/generic_const_exprs/size_of-dyn-trait.rs: [missing] -> pass (J2)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 4b3ba5844e8831c9b3ee5a5643cdff5da0677426 --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. aarch64-apple: 8512.0s -> 6923.8s (-18.7%)
  2. x86_64-gnu-llvm-20: 2404.1s -> 2842.5s (18.2%)
  3. dist-x86_64-apple: 7185.0s -> 6096.5s (-15.2%)
  4. dist-aarch64-apple: 6702.2s -> 5767.2s (-14.0%)
  5. dist-various-2: 2223.4s -> 1967.1s (-11.5%)
  6. armhf-gnu: 4926.0s -> 5489.8s (11.4%)
  7. dist-armhf-linux: 4864.6s -> 5321.3s (9.4%)
  8. x86_64-gnu-llvm-20-1: 3236.2s -> 3521.1s (8.8%)
  9. x86_64-gnu-gcc: 3136.2s -> 3411.5s (8.8%)
  10. arm-android: 5820.1s -> 6227.1s (7.0%)
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 (4b3ba58): 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.2% [0.1%, 0.5%] 3
Regressions ❌
(secondary)
0.3% [0.1%, 0.7%] 30
Improvements ✅
(primary)
-0.4% [-0.7%, -0.1%] 4
Improvements ✅
(secondary)
-0.3% [-0.7%, -0.1%] 5
All ❌✅ (primary) -0.1% [-0.7%, 0.5%] 7

Max RSS (memory usage)

Results (primary -0.1%, secondary 1.9%)

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

mean range count
Regressions ❌
(primary)
2.2% [0.5%, 4.8%] 5
Regressions ❌
(secondary)
3.5% [0.6%, 6.3%] 18
Improvements ✅
(primary)
-2.3% [-4.3%, -1.2%] 5
Improvements ✅
(secondary)
-1.8% [-3.0%, -0.8%] 8
All ❌✅ (primary) -0.1% [-4.3%, 4.8%] 10

Cycles

Results (primary 1.3%, secondary -1.5%)

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

mean range count
Regressions ❌
(primary)
1.3% [1.3%, 1.3%] 1
Regressions ❌
(secondary)
5.3% [1.7%, 9.2%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.6% [-13.1%, -2.0%] 15
All ❌✅ (primary) 1.3% [1.3%, 1.3%] 1

Binary size

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

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.4%] 21
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 11
Improvements ✅
(primary)
-0.1% [-0.8%, -0.0%] 19
Improvements ✅
(secondary)
-0.6% [-0.8%, -0.3%] 3
All ❌✅ (primary) -0.0% [-0.8%, 0.4%] 40

Bootstrap: 473.667s -> 474.933s (0.27%)
Artifact size: 390.66 MiB -> 390.48 MiB (-0.05%)

@cjgillot cjgillot deleted the no-null-op branch October 23, 2025 10:12
tautschnig added a commit to tautschnig/kani that referenced this pull request Oct 24, 2025
Relevant upstream PR:
- rust-lang/rust#147793 (Replace NullOp::SizeOf and
NullOp::AlignOf by lang items.)

Resolves: model-checking#4425
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 26, 2025
…ug-msg, r=Noratrieb,dianqk

Improve the ICE message for invalid nullary intrinsic calls

In rust-lang#148104, we found the panic message here rather confusing, and (if I'm reading the tea leaves right) that's because the intended audience for either side of the phrase is very different. I think this is more clear if/when this is encountered by users.

I expect this ICE to be hit in practice by people calling the `size_of` and `align_of` intrinsics, so it's now _kind of_ helpful for those users too.

The original effort to stop backends from needing to support nullary intrinsics added a note to all these const-only intrinsics, but when rust-lang#147793 ported two more the paragraph wasn't added. I've added it.
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 26, 2025
…ug-msg, r=Noratrieb,dianqk

Improve the ICE message for invalid nullary intrinsic calls

In rust-lang#148104, we found the panic message here rather confusing, and (if I'm reading the tea leaves right) that's because the intended audience for either side of the phrase is very different. I think this is more clear if/when this is encountered by users.

I expect this ICE to be hit in practice by people calling the `size_of` and `align_of` intrinsics, so it's now _kind of_ helpful for those users too.

The original effort to stop backends from needing to support nullary intrinsics added a note to all these const-only intrinsics, but when rust-lang#147793 ported two more the paragraph wasn't added. I've added it.
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 26, 2025
…ug-msg, r=Noratrieb,dianqk

Improve the ICE message for invalid nullary intrinsic calls

In rust-lang#148104, we found the panic message here rather confusing, and (if I'm reading the tea leaves right) that's because the intended audience for either side of the phrase is very different. I think this is more clear if/when this is encountered by users.

I expect this ICE to be hit in practice by people calling the `size_of` and `align_of` intrinsics, so it's now _kind of_ helpful for those users too.

The original effort to stop backends from needing to support nullary intrinsics added a note to all these const-only intrinsics, but when rust-lang#147793 ported two more the paragraph wasn't added. I've added it.
rust-timer added a commit that referenced this pull request Oct 26, 2025
Rollup merge of #148118 - saethlin:nullary-intrinsic-check-bug-msg, r=Noratrieb,dianqk

Improve the ICE message for invalid nullary intrinsic calls

In #148104, we found the panic message here rather confusing, and (if I'm reading the tea leaves right) that's because the intended audience for either side of the phrase is very different. I think this is more clear if/when this is encountered by users.

I expect this ICE to be hit in practice by people calling the `size_of` and `align_of` intrinsics, so it's now _kind of_ helpful for those users too.

The original effort to stop backends from needing to support nullary intrinsics added a note to all these const-only intrinsics, but when #147793 ported two more the paragraph wasn't added. I've added it.
@panstromek
Copy link
Contributor

perf triage:

Justified by #147793 (comment) and #147793 (comment). Post-merge results seem worse, mostly because there's some deep-vector spike that came back in #142712 (possibly noise?).

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Oct 27, 2025
github-merge-queue bot pushed a commit to model-checking/kani that referenced this pull request Oct 29, 2025
Relevant upstream PR:
- rust-lang/rust#147793 (Replace NullOp::SizeOf
and NullOp::AlignOf by lang items.)

Resolves: #4425

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

---------

Co-authored-by: thanhnguyen-aws <[email protected]>
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 31, 2025
Replace NullOp::SizeOf and NullOp::AlignOf by lang items.

Part of rust-lang#146411

Fixes rust-lang#119729
Keeps rust-lang#136175 as it involves `offset_of!` which this PR does not touch.

r? `@ghost`
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. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

internal compiler error: SizeOf MIR operator called for unsized type dyn Send

10 participants