Skip to content

Rollup of 11 pull requests#156679

Closed
JonathanBrouwer wants to merge 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-jnoSEy4
Closed

Rollup of 11 pull requests#156679
JonathanBrouwer wants to merge 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-jnoSEy4

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

bjorn3 and others added 28 commits May 5, 2026 17:33
In the future this can be used by build-std, but until then it is still
useful for allowing rust-analyzer to work offline.

This increases the unpacked size by 24MB (from 116MB to 140MB) and the
compressed size by only 2MB (from 18MB to 20MB)
Add support for inline assembly for the amdgpu backend (the
amdgcn-amd-amdhsa target).
Add register classes for `vgpr` (vector general purpose register) and
`sgpr` (scalar general purpose register).
The LLVM backend supports two more classes, `reg`, which is either VGPR
or SGPR, up to the compiler to decide. As instructions often rely on a
register being either a VGPR or SGPR for the assembly to be valid, reg
doesn’t seem that useful (I struggled to write correct tests for it), so
I didn’t end up adding it.
The fourth register class is AGPRs, which only exist on some hardware
versions (not the consumer ones) and they have restricted ways to write
and read from them, which makes it hard to write a Rust variable into
them. They could be used inside assembly blocks, but I didn’t add them
as Rust register class.

There is one change affecting general inline assembly code, that is
`InlineAsmReg::name()` now returns a `Cow` instead of a `&'static str`.
Because amdgpu has many registers, 256 VGPRs plus combinations of 2 or 4
VGPRs, and I didn’t want to list hundreds of static strings, the amdgpu
reg stores the register number(s) and a non-static String is generated
at runtime for the register name.
Use just two variants for SGPRs and VGPRs, each with an int for the
register size in bits.
Remove support for 64-bit vector types to make it simpler.
There is no reference to `char` in c_short.md
The documentation for the `format_into` methods on unsigned integers
still said "in signed decimal format". Change them to say "unsigned".
…acrum

Include vendored sources in the rust-src component

In the future this can be used by build-std, but until then it is still useful for allowing rust-analyzer to work offline.

This increases the unpacked size by 24MB (from 116MB to 140MB) and the compressed size by only 2MB (from 18MB to 20MB)
Add inline asm support for amdgpu

Add support for inline assembly for the amdgpu backend (the amdgcn-amd-amdhsa target).
Add register classes for `vgpr` (vector general purpose register) and `sgpr` (scalar general purpose register).
The LLVM backend supports two more classes, `reg`, which is either VGPR or SGPR, up to the compiler to decide. As instructions often rely on a register being either a VGPR or SGPR for the assembly to be valid, reg doesn’t seem that useful (I struggled to write correct tests for it), so I didn’t end up adding it.
The fourth register class is AGPRs, which only exist on some hardware versions (not the consumer ones) and they have restricted ways to write and read from them, which makes it hard to write a Rust variable into them. They could be used inside assembly blocks, but I didn’t add them as Rust register class.

There is one change affecting general inline assembly code, that is `InlineAsmReg::name()` now returns a `Cow` instead of a `&'static str`. Because amdgpu has many registers, 256 VGPRs plus combinations of 2 or 4 VGPRs, and I didn’t want to list hundreds of static strings, the amdgpu reg stores the register number(s) and a non-static String is generated at runtime for the register name.

Tracking issue: rust-lang#135024
remove/update various cfg(miri)

I went over all `cfg(miri)` in `library/`. Most of the things I noticed have become separate PRs; these here are the few remaining scattered little fixes in various places.
Fix missing period in Iterator product doc comment

It looks like the other doc comments all end with a period.
std: replace "safe" with "sound" in safety documentation

- `env::set_var`
- `env::remove_var`

Context: rust-lang#124636
…JonathanBrouwer,mu001999

Support defaults for static EIIs

Tracking issue: rust-lang#125418

rust-lang#154193 added EII support for statics, but left default implementations for "a followup PR". This PR implements it.

Maybe I should remove `no-prefer-dynamic` if rust-lang#156577 is accepted.
…Sapin

c ffi document fixes for c_short.md

There is no reference to `char` in c_short.md
…imonSapin

library: Fix std compilation for espidf target in unix::process

Fixes a regression on the riscv32imac-esp-espidf target caused by commit 7bf5fe7 (linked issue rust-lang#156537) . The unix_kill_process_group feature attempts to use libc::SIGKILL, which is not supported on the espidf target.

Discussed in `esp-idf-sys` issue: esp-rs/esp-idf-sys#419
…monSapin

Change division to multiplication in floating-point midpoint

Multiplication is faster than division on most (all?) platforms. While the optimizer will handle this, there is really no point in relying on that. Using multiplication directly will not have any drawbacks and are numerically identical (in this case since 1.0 / 2.0 == 0.5)

Consider the examples at https://godbolt.org/z/oMvb9vobG where it is clear that the non-optimized version uses division, while the optimized version uses multiplication.
…imonSapin

Fix typo in `format_into` docs: signed -> unsigned

The documentation for the `format_into` methods on unsigned integers
still said "in signed decimal format". Change them to say "unsigned".
change `other uses of const` to `raw pointers` in const keyword docs

this section only talks about how `const` is used in raw pointers and doesn't give any other uses, so in my opinion it would be a bit clearer if the section was named `raw pointers` or something similar.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 17, 2026
@rustbot rustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label May 17, 2026
@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels May 17, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

📌 Commit 7bec1bf 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-review Status: Awaiting review from the assignee but also interested parties. labels May 17, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 17, 2026
Rollup of 11 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/eii/static/default_cross_crate_explicit.rs stdout ----

error: auxiliary build of /Users/runner/work/rust/rust/tests/ui/eii/static/auxiliary/decl_with_default.rs failed to compile: 
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/eii/static/auxiliary/decl_with_default.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate_explicit/auxiliary" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "--crate-type" "dylib" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate_explicit/auxiliary"
stdout: none
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
   |
   = note:  "cc" "-Wl,-exported_symbols_list" "-Wl,/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate_explicit/auxiliary/rustcptMS6C/list" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate_explicit/auxiliary/rustcptMS6C/symbols.o" "<1 object files omitted>" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate_explicit/auxiliary/rustcptMS6C/rmeta.o" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libstd-8c43308ae46e5a65.dylib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-*.rlib" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate_explicit/auxiliary" "-o" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate_explicit/auxiliary/libdecl_with_default.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-install_name" "-Wl,@rpath/libdecl_with_default.dylib" "-nodefaultlibs" "-Wl,-rpath,@loader_path/../../../../../../stage2/lib/rustlib/aarch64-apple-darwin/lib"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: Undefined symbols for architecture arm64:
             "__RNvCsiwvXj9O5Y0H_17decl_with_default5DECL1", referenced from:
                 <initial-undefines>
           ld: symbol(s) not found for architecture arm64
           clang: error: linker command failed with exit code 1 (use -v to see invocation)
           

error: aborting due to 1 previous error
------------------------------------------

---- [ui] tests/ui/eii/static/default_cross_crate_explicit.rs stdout end ----
---- [ui] tests/ui/eii/static/default_cross_crate.rs stdout ----

error: auxiliary build of /Users/runner/work/rust/rust/tests/ui/eii/static/auxiliary/decl_with_default.rs failed to compile: 
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/eii/static/auxiliary/decl_with_default.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate/auxiliary" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "--crate-type" "dylib" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate/auxiliary"
stdout: none
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
   |
   = note:  "cc" "-Wl,-exported_symbols_list" "-Wl,/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate/auxiliary/rustcLxNNy8/list" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate/auxiliary/rustcLxNNy8/symbols.o" "<1 object files omitted>" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate/auxiliary/rustcLxNNy8/rmeta.o" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libstd-8c43308ae46e5a65.dylib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-*.rlib" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate/auxiliary" "-o" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/static/default_cross_crate/auxiliary/libdecl_with_default.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-install_name" "-Wl,@rpath/libdecl_with_default.dylib" "-nodefaultlibs" "-Wl,-rpath,@loader_path/../../../../../../stage2/lib/rustlib/aarch64-apple-darwin/lib"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: Undefined symbols for architecture arm64:
             "__RNvCsiwvXj9O5Y0H_17decl_with_default5DECL1", referenced from:
                 <initial-undefines>
           ld: symbol(s) not found for architecture arm64
           clang: error: linker command failed with exit code 1 (use -v to see invocation)
           

error: aborting due to 1 previous error
------------------------------------------

@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 May 17, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

💔 Test for d4f4f2b failed: CI. Failed jobs:

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 18, 2026

PR #156583, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 18, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 18, 2026

PR #149793, which is a member of this rollup, was unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 18, 2026
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. O-unix Operating system: Unix-like 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.