Skip to content

Rollup of 25 pull requests#159942

Merged
rust-bors[bot] merged 86 commits into
rust-lang:mainfrom
jhpratt:rollup-pnCVT56
Jul 26, 2026
Merged

Rollup of 25 pull requests#159942
rust-bors[bot] merged 86 commits into
rust-lang:mainfrom
jhpratt:rollup-pnCVT56

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 26, 2026

Copy link
Copy Markdown
Member

View all comments

Successful merges:

r? @ghost

Create a similar rollup

him2him2 and others added 30 commits February 10, 2026 10:21
- library/core/src/macros/panic.md: remove duplicate word ("another other" → "another")
- library/core/src/error.md: fix spacing ("Often times" → "Oftentimes")
- library/core/src/ptr/docs/as_ref.md: fix wrong types in Null-unchecked section (&mut T → &T)
- library/core/src/ffi/c_ulong.md: fix article ("an u64" → "a u64")
- library/core/src/ffi/c_void.md: fix plural ("old Rust compiler" → "old Rust compilers")
- library/core/src/ptr/docs/as_uninit_slice.md: fix subject-verb agreement ("is true" → "are true")
- library/std_detect/README.md: fix article ("an user-space" → "a user-space")
Expose the internal `requires_caller_location` query through
rustc_public so tools can detect when an instance has an implicit
extra `&'static Location<'static>` argument in its ABI that is
not present in the MIR body signature.

Fixes rust-lang/rustc_public#123
Add an API to construct the `&'static Location<'static>` constant
that must be passed as the implicit extra argument when calling a
`#[track_caller]` function. Users provide the span of the call
site (or the callee's definition span for reify shim fallback).

Fixes rust-lang/rustc_public#62
Since cfg_select is stable since 1.95, this can be enabled.
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
This is probably not what the user wants:

    error: nested Markdown emphasis in HTML `style` tag
      --> $DIR/invalid-html-tags-correct-script-style.rs:11:16
       |
    LL | /// One <style>*emph*</style>
       |                ^^^^^^ Markdown translates this into HTML, but the browser parses it as CSS
       |
    help: to turn off Markdown parsing, put the tag at the start of the line
       |
    LL ~ /// One
    LL ~ /// <style>*emph*</style>
       |
The `test_dir_remove_file` test currently fails under Windows 7 on:

```
thread 'fs::tests::test_dir_remove_file' (2028) panicked at library/std/src/fs/tests.rs:2590:5:
dir.remove_file("foo.txt") failed with: The parameter is incorrect. (os error 87)
```

Looking into it, this is because the `FILE_DISPOSITION_INFO_EX` variant
of the `SetFileInformationByHandle` API is used while it is only
available starting from Windows 10 1607. However,
`FILE_DISPOSITION_INFO` is still available since Vista.

This is therefore fixed by introducing a fallback to the latter API if
the former fails. This is achieved by re-using some logic that is
already available through `File::delete` and that does exactly this.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
Add a method Body::caller_location that resolves the correct caller
location constant for a call to a #[track_caller] function, walking
inlined source scopes to handle MIR inlining correctly.

Body now stores source scope data as a public field. Body::new
populates it with empty entries (no inlining info); bodies obtained
from the compiler have full scope data populated.

Span::as_caller_location is now pub(crate) since users should use
Body::caller_location instead, which handles inlining correctly.
In favor of passing raw pointers to inline asm.
…e lint

The new handling for non-local macros in
`semicolon_in_expressions_from_macros` produces new deny-by-default
lints on various existing crates, which have not previously received
warnings because prior Rust versions suppressed them. Split those out
into a new `semicolon_in_expressions_from_non_local_macros` lint, and
make that one warn-by-default (and FCW warn-in-deps), rather than
deny-by-default, to give the ecosystem time to adapt.

This reintroduces the `is_local` tracking from commit
9192337.
…ros`

The automatic mechanism to produce lint examples won't work, since this
lint needs a separate crate, so add a `rust,ignore` example and manually
provide the compiler output.
This is currently a no-op, but will be useful when const in `global_asm!`
can be pointers.
Currently global_asm already have symbol names when using v0 scheme, this
makes them obtain symbols with legacy scheme too.
This gives the asm-const code the basic ability to deal wiht pointer and
provenances, which lays the ground work for asm_const_ptr.

Note that `SymStatic` is not fully removed, a specialized is kept and
renamed as `SymThreadLocalStatic`, for `#[thread_local]` statics where CTFE
does not support naming. The `#[thread_local]` is unstable feature and it's
not clear if we want to support this in `sym`, but removal of it should be
a separate PR.
With the previous commit, now we can see there are some code duplication
for the handling of `GlobalAlloc` inside backends. Do some clean up to
unify them.
CTFE pointers created via type ID, `without_provenance` or pointers to const
ZSTs can now be codegenned with all 3 backends. These pointers are generated
in the same way as integers.
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 26, 2026
@rust-bors

rust-bors Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

💔 Test for db930f1 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-mingw-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests\run-make-cargo\amdgpu-lto stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make-cargo\\amdgpu-lto\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 27
"D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2-tools-bin\\cargo.exe" "build" "--release" "--lib" "--manifest-path" "Cargo.toml" "-Zbuild-std=core" "--target" "amdgcn-amd-amdhsa"
output status: `exit code: 101`
---
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
   Compiling compiler_builtins v0.1.160 (D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\lib\rustlib\src\rust\library\compiler-builtins\compiler-builtins)
   Compiling core v0.0.0 (D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\lib\rustlib\src\rust\library\core)
   Compiling amdgpu_lto v0.1.0 (D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\run-make-cargo\amdgpu-lto\rmake_out)
error: linking with `rust-lld` failed: exit code: 0xc0000374
  |
  = note: "rust-lld" "-flavor" "gnu" "--version-script=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make-cargo\\amdgpu-lto\\rmake_out\\target\\amdgcn-amd-amdhsa\\release\\deps\\rustcJ6mZpP\\list" "--no-undefined-version" "<1 object files omitted>" "--as-needed" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make-cargo\\amdgpu-lto\\rmake_out\\target\\amdgcn-amd-amdhsa\\release\\deps\\rustcJ6mZpP\\raw-dylibs" "-Bdynamic" "--eh-frame-hdr" "-z" "noexecstack" "-o" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make-cargo\\amdgpu-lto\\rmake_out\\target\\amdgcn-amd-amdhsa\\release\\deps\\amdgpu_lto.elf" "--gc-sections" "-shared" "-O1" "--strip-debug"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: 

error: could not compile `amdgpu_lto` (lib) due to 1 previous error
------------------------------------------

---- [run-make] tests\run-make-cargo\amdgpu-lto stdout end ----

failures:
---
Currently active steps:
test::RunMakeCargo { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-gnu, forced_compiler: false }, target: x86_64-pc-windows-gnu } at src\bootstrap\src\core\build_steps\test.rs:1965
test::Compiletest { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-gnu, forced_compiler: false }, target: x86_64-pc-windows-gnu, mode: run-make, suite: "run-make-cargo", path: "tests/run-make-cargo", compare_mode: None } at src\bootstrap\src\core\build_steps\test.rs:1965
Build completed unsuccessfully in 3:02:29
make: *** [Makefile:126: ci-mingw-x] Error 1
  local time: Sun Jul 26 07:33:24 CUT 2026
  network time: Sun, 26 Jul 2026 07:33:24 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@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 Jul 26, 2026
@rust-bors

rust-bors Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 17m 45s
Pushing 5d48869 to main...

@github-actions

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 fdbd8ee (parent) -> 5d48869 (this PR)

Test differences

Show 952 test diffs

Stage 1

  • [ui (polonius)] tests/ui/asm/asm-const-ptr-mir-inline.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/const-generics/mgca/trait-assoc-fn-as-const-arg.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/feature-gates/feature-gate-asm_const_ptr.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/proc-macro/inner-attr-file-mod-cfg-attr.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/next-solver/global-where-bound-normalization.rs: [missing] -> pass (J0)
  • iter::adapters::step_by::test_step_by_new_range_iter: [missing] -> pass (J1)
  • [crashes] tests/crashes/138088.rs: pass -> [missing] (J3)
  • [rustdoc-html] tests/rustdoc-html/doc-cfg/mutually-exclusive-cfg-item.rs: [missing] -> pass (J3)
  • [ui] tests/rustdoc-ui/lints/invalid-html-tags-correct-script-style.rs: [missing] -> pass (J3)
  • [ui] tests/ui-fulldeps/rustc_public/check_track_caller.rs: [missing] -> ignore (ignored when the bootstrapping stage is stage1) (J3)
  • [ui] tests/ui/asm/asm-const-ptr-mir-inline.rs: [missing] -> pass (J4)
  • [ui] tests/ui/const-generics/mgca/trait-assoc-fn-as-const-arg.rs: [missing] -> pass (J4)
  • [ui] tests/ui/feature-gates/feature-gate-asm_const_ptr.rs: [missing] -> pass (J4)
  • [ui] tests/ui/proc-macro/inner-attr-file-mod-cfg-attr.rs: [missing] -> pass (J4)
  • [ui] tests/ui/traits/next-solver/global-where-bound-normalization.rs: [missing] -> pass (J4)

Stage 2

  • [rustdoc-html] tests/rustdoc-html/doc-cfg/mutually-exclusive-cfg-item.rs: [missing] -> pass (J2)
  • [ui] tests/rustdoc-ui/lints/invalid-html-tags-correct-script-style.rs: [missing] -> pass (J2)
  • [ui] tests/ui/asm/asm-const-ptr-mir-inline.rs: [missing] -> pass (J5)
  • [ui] tests/ui/const-generics/mgca/trait-assoc-fn-as-const-arg.rs: [missing] -> pass (J5)
  • [ui] tests/ui/proc-macro/inner-attr-file-mod-cfg-attr.rs: [missing] -> pass (J5)
  • [ui] tests/ui/traits/next-solver/global-where-bound-normalization.rs: [missing] -> pass (J5)
  • iter::adapters::step_by::test_step_by_new_range_iter: [missing] -> pass (J6)
  • [ui] tests/ui/feature-gates/feature-gate-asm_const_ptr.rs: [missing] -> ignore (only executed when the architecture is x86_64) (J7)
  • [crashes] tests/crashes/138088.rs: pass -> [missing] (J8)
  • [ui] tests/ui/feature-gates/feature-gate-asm_const_ptr.rs: [missing] -> pass (J9)
  • [ui] tests/ui-fulldeps/rustc_public/check_track_caller.rs: [missing] -> pass (J10)

Additionally, 926 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 5d4886964b04e1aa6aca158a677183a778e2950d --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: 1h 39m -> 3h 11m (+92.2%)
  2. x86_64-gnu: 1h 37m -> 2h 22m (+46.2%)
  3. x86_64-gnu-llvm-22-2: 1h 9m -> 1h 39m (+42.1%)
  4. dist-riscv64-linux-gnu: 1h 4m -> 1h 29m (+38.8%)
  5. x86_64-msvc-ext3: 1h 21m -> 1h 52m (+37.9%)
  6. dist-i686-msvc: 1h 30m -> 2h 3m (+36.7%)
  7. x86_64-msvc-2: 2h 32m -> 1h 37m (-35.7%)
  8. dist-x86_64-llvm-mingw: 1h 29m -> 2h (+35.0%)
  9. x86_64-mingw-2: 2h 43m -> 1h 48m (-33.9%)
  10. dist-i586-gnu-i586-i686-musl: 1h 13m -> 1h 36m (+31.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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#138618 Support using const pointers in asm const operand 4a3ca37b39531ea037787d31b711d8beaefa15e9 (link)
#157962 Lower paths to functions in const args as ConstKind::Error faf7bb093c7a28273919a1e9c8455915f80731d4 (link)
#158709 rustdoc: warn on improperly interleaved HTML/MD 851995ec8ec84838be154fba1cae103e56ccbfe1 (link)
#159174 Fix implicit_provenance_casts warnings on Xous 3969a1ae5218efc6a22bfcaa4b24369097f6bb1d (link)
#159179 enable unreachable_cfg_select_predicates lint as part of … b8defeb3dfdd6e1ce8f5abd0483bc0db7e003a31 (link)
#159518 iter: extend step_by specialization to cover StepBy<RangeIt… 2bde1f61511927da3dc12b9167da1a70e9098796 (link)
#159673 bootstrap: forward -fdebug-prefix-map when using cc 1d2276a63d933706e1bd8b04e3a4ff289d7d0cab (link)
#159700 Split non-local semicolon_in_expressions_from_macros into… d3188e5eb60cf8e4230bb6fd1c9b9575b086a500 (link)
#159720 document #[global_allocator] constraints 5422d73d2c2bddc99c398c361d891a36f7ce09f3 (link)
#159732 optimization: don't look for diagnostic/canonical items wit… b5443724d81def04a738385231c1982b30d4cf98 (link)
#159738 implement CovariantUnsafeCell e32abf5e2aa05a9b04c8dd38214be50f7c4d7524 (link)
#159740 reuse regular exported_non_generic_symbols logic in Miri 5b00f616ed660d27ace7136a8ce00e258139f2cd (link)
#159780 check extern "custom" function pointers 92812ddd7578c6faaf2e14854dbebc52c95cacf9 (link)
#159786 rustdoc-js: ignore editor temp files in test folder discove… 4589c132aaec22704086f10bfd41ac2fc7a39d66 (link)
#159819 std::sync::poison: disable auto_cfg on PoisonError::new 3747e47c4f3ba56477599ceec1289588e1aa43a2 (link)
#152439 Fix typos and grammar in library documentation c9ea4f5db18d3effbb96d84d486fb545b19b9aea (link)
#155388 stepping into where-clauses during normalization may be pro… c3d07a9a378cc87e1099f165b20df96df1b74099 (link)
#155914 when bailing on ambiguity, don't force other results to amb… fa39e3164a05346b3030a809d8b4b3a76b0315c2 (link)
#159204 Add support to caller_location to rustc_public 2ad23d4f031c7148d9f76774c17608368aeb87f1 (link)
#159439 Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove… e0eb3ae357b2d46f690c4b4e5810d144dd5fa23a (link)
#159676 Update wasm-component-ld to 0.5.27 a1b57e547432bf1c448ede6c35ad7be5441fd409 (link)
#159695 proc_macro: Fix cfg_attr inner attrs in file modules becec03a5fd44fe6cbf8701b8af9513535f947a6 (link)
#159730 allow accessing the contents of UnsafeCell without going th… 7a7eb4260a595a514e61c6026c4e59659fb4c743 (link)
#159809 Avoid #[target_features] 620e257db25cef62d6f3736f2b4c3a675da80466 (link)
#159878 bootstrap: Remove obsolete option `build.compiletest-use-st… b71c7aabfd9888115510bb97c3d9fe5f07290ab9 (link)

previous master: fdbd8ee70d

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5d48869): 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
Regressions ❌
(secondary)
0.4% [0.2%, 0.5%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.0%, secondary -0.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)
2.3% [1.5%, 3.2%] 2
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
-3.9% [-5.4%, -2.4%] 2
All ❌✅ (primary) -2.0% [-2.0%, -2.0%] 1

Cycles

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

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 487.865s -> 490.416s (0.52%)
Artifact size: 387.69 MiB -> 387.71 MiB (0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 26, 2026
@jhpratt

jhpratt commented Jul 26, 2026

Copy link
Copy Markdown
Member Author

Looks to be entirely caused by #159732, which was expected and deemed acceptable ahead of time.

@rustbot label perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jul 26, 2026
@jhpratt
jhpratt deleted the rollup-pnCVT56 branch July 26, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.