Skip to content

Rollup of 7 pull requests#154440

Closed
matthiaskrgr wants to merge 22 commits intorust-lang:mainfrom
matthiaskrgr:rollup-k7llfJl
Closed

Rollup of 7 pull requests#154440
matthiaskrgr wants to merge 22 commits intorust-lang:mainfrom
matthiaskrgr:rollup-k7llfJl

Conversation

@matthiaskrgr
Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

RalfJung and others added 22 commits March 10, 2026 22:59
Clang and gcc use this option to control linking behavior too. Some
targets need to be linked against a special crt which enables
profiling at runtime.

This makes using gprof a little easier with Rust binaries. Otherwise,
rustc must be passed `-Clink-args=-pg` to ensure the correct startup
code is linked.
mingw exposes the `_mcount` symbol for profiling.
libgmon needs to be linked. This also requires readding a few
other system libraries to satisfy its dependencies.
The warning has no error code, so in a `-D warnings` environment, it's
impossible to ignore if it consistently breaks your build.  Change it
to a note so it is still visible, but doesn't break the build
Remove the confusing word "error".  The diagnostic is already prefixed
with a level when it is displayed, so this is redundant and possibly
confusing ("warning: error ...").

Add some help text summarizing the impact of what happened: the next
build won't be able to reuse work from the current run.
…e fail

Use a proc macro to observe the incremental session directory and do
something platform specific so that renaming the '-working' session
directory during finalize_session_directory will fail.  On Unix,
change the permissions on the parent directory to be read-only.  On
Windows, open and leak a file inside the `-working` directory.
```
error[E0061]: this method takes 0 arguments but 1 argument was supplied
  --> $DIR/shadowed-intrinsic-method.rs:18:7
   |
LL |     a.borrow(());
   |       ^^^^^^ -- unexpected argument of type `()`
   |
note: the `borrow` call is resolved to the method in `std::borrow::Borrow`, shadowing the method of the same name on the inherent impl for `A`
  --> $DIR/shadowed-intrinsic-method.rs:18:7
   |
LL | use std::borrow::Borrow;
   |     ------------------- `std::borrow::Borrow` imported here
...
LL |     a.borrow(());
   |       ^^^^^^ refers to `std::borrow::Borrow::borrow`
note: method defined here
  --> $SRC_DIR/core/src/borrow.rs:LL:COL
help: you might have meant to call the other method; you can use the fully-qualified path to call it explicitly
   |
LL -     a.borrow(());
LL +     A::borrow(&mut a, ());
   |
help: remove the extra argument
   |
LL -     a.borrow(());
LL +     a.borrow();
   |
```
Handle correct gramar in the face of a single other option, or many.
* Create GPU target notification group
* Update triagebot.toml

Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>
Pass -pg to linker when using -Zinstrument-mcount

This selects a slightly different crt on gnu targets which enables the profiler within glibc.

This makes using gprof a little easier with Rust binaries. Otherwise, rustc must be passed `-Clink-args=-pg` to ensure the correct startup code is linked.
…rray-ice, r=chenyukang

Remove divergence check from check_expr_array

Fixes rust-lang#153695.

`check_expr_array` currently assumes it should only be entered with` self.diverges == Diverges::Maybe`, but that assumption does not appear to hold in all valid cases. A never-pattern parameter can seed a function or closure body with inherited `Diverges::Always`, and exprs in that body are still typecked.
move many tests out of `ui/unsafe`

`ui/unsafe` is a pretty big and generic directory. This PR moves some tests from it to `ui/union` and some others to a new `rustc_layout_scalar_valid_range` directory.
r? @Kivooeo
…ath, r=davidtwco

Suggest fully qualified path on method name collision

Provide suggestion for using a fully qualified path when method names collide between traits and inherent impl.

```
error[E0061]: this method takes 0 arguments but 1 argument was supplied
  --> $DIR/shadowed-intrinsic-method.rs:20:7
   |
LL |     a.borrow(());
   |       ^^^^^^ -- unexpected argument of type `()`
   |
note: the `borrow` call is resolved to the method in `std::borrow::Borrow`, shadowing the method of the same name on the inherent impl for `A`
  --> $DIR/shadowed-intrinsic-method.rs:20:7
   |
LL | use std::borrow::Borrow;
   |     ------------------- `std::borrow::Borrow` imported here
...
LL |     a.borrow(());
   |       ^^^^^^ refers to `std::borrow::Borrow::borrow`
note: method defined here
  --> $SRC_DIR/core/src/borrow.rs:LL:COL
help: you might have meant to call the other method; you can use the fully-qualified path to call it explicitly
   |
LL -     a.borrow(());
LL +     A::borrow(&mut a, ());
   |
help: remove the extra argument
   |
LL -     a.borrow(());
LL +     a.borrow();
   |
```

Fix rust-lang#54103.
simd_add/sub/mul/neg: document overflow behavior

`simd_neg` had an odd comment about overflow not being UB, without saying what the behavior is instead. Replace that by just saying this uses wrapping arithmetic, and add the same for add/sub/mul. div/rem are already documented to cause UB on div-by-zero and min-div-by-minus-one, and shl/shr cause UB on too large shift amounts.
…r=wesleywiser

Change "error finalizing incremental compilation" text and emit it as a note, not a warning

As mentioned in rust-lang#151181 (comment) and rust-lang#151181 (comment) the current message could be improved:

1. Right now it displays as "warning: error ..." which is confusing (is it an error or a warning)
2. It doesn't give the user a clear indication of what the consequences are
3. The _current_ build is successful. The _next_ build might be slower

The new message is now

```text
note: did not finalize incremental compilation session directory ...
  |
  = help: the next build will not be able to reuse work from this compilation
```

I started a zulip thread [#t-compiler/incremental > Ergonomics of "error finalizing incremental session"](https://rust-lang.zulipchat.com/#narrow/channel/241847-t-compiler.2Fincremental/topic/Ergonomics.20of.20.22error.20finalizing.20incremental.20session.22/with/580191447)
…roup, r=jieyouxu

Create GPU target notification group

Creating the notification group for the newly created GPU target (see [mcp#960](https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Create.20a.20GPU.20notification.20group.20compiler-team.23960/near/568629680))

I'm following these [steps](rust-lang#133334).

(feel free to suggest a better wording)

r? @jieyouxu
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 26, 2026
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 26, 2026
@matthiaskrgr
Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 26, 2026

📌 Commit 0243e13 has been approved by matthiaskrgr

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

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 27, 2026
Rollup of 7 pull requests

Successful merges:

 - #152457 (Pass -pg to linker when using -Zinstrument-mcount)
 - #154031 (Remove divergence check from check_expr_array)
 - #154418 (move many tests out of `ui/unsafe`)
 - #153662 (Suggest fully qualified path on method name collision)
 - #153675 (simd_add/sub/mul/neg: document overflow behavior)
 - #154110 (Change "error finalizing incremental compilation" text and emit it as a note, not a warning)
 - #154430 (Create GPU target notification group)
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job test-various 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/incremental-finalize-fail stdout ----

error: rmake recipe failed to complete
status: exit status: 1
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/incremental-finalize-fail/rmake_out" && env -u RUSTFLAGS -u __RUSTC_DEBUG_ASSERTIONS_ENABLED -u __STD_DEBUG_ASSERTIONS_ENABLED -u __STD_REMAP_DEBUGINFO_ENABLED AR="/wasi-sdk-30.0-x86_64-linux/bin/llvm-ar" BUILD_ROOT="/checkout/obj/build/x86_64-unknown-linux-gnu" CC="/wasi-sdk-30.0-x86_64-linux/bin/wasm32-wasip1-clang" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fno-exceptions --target=wasm32-wasip1" CXX="/wasi-sdk-30.0-x86_64-linux/bin/wasm32-wasip1-clang++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fno-exceptions --target=wasm32-wasip1" HOST_RUSTC_DYLIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils abi aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cas cfguard cgdata codegen codegentypes core coroutines coverage csky cskyasmparser cskycodegen cskydesc cskydisassembler cskyinfo debuginfobtf debuginfocodeview debuginfodwarf debuginfodwarflowlevel debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dtlto dwarfcfichecker dwarflinker dwarflinkerclassic dwarflinkerparallel dwp engine executionengine extensions filecheck frontendatomic frontenddirective frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo hipstdpar instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcdebugging orcjit orcshared orctargetprocess passes plugins powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld sandboxir scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support supportlsp symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser telemetry textapi textapibinaryreader transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray xtensa xtensaasmparser xtensacodegen xtensadesc xtensadisassembler xtensainfo" LLVM_FILECHECK="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" NODE="/node/bin/node" PYTHON="/usr/bin/python3" RUNNER="/wasmtime-v38.0.4-x86_64-linux/wasmtime run -C cache=n --dir . --env RUSTC_BOOTSTRAP" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTDOC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" SOURCE_ROOT="/checkout" TARGET="wasm32-wasip1" TARGET_EXE_DYLIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-wasip1/lib" __BOOTSTRAP_JOBS="4" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/incremental-finalize-fail/rmake"
stdout: none
--- stderr -------------------------------
command failed at line 29
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/incremental-finalize-fail/rmake_out:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/incremental-finalize-fail/rmake_out" "poison/lib.rs" "--crate-name" "poison" "--crate-type" "proc-macro" "--target=wasm32-wasip1"
output status: `exit status: 1`
=== STDOUT ===



=== STDERR ===
warning: dropping unsupported crate type `proc-macro` for target `wasm32-wasip1`

error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type
##[error]  --> poison/lib.rs:18:1
   |
18 | #[proc_macro]
   | ^^^^^^^^^^^^^

---

error: aborting due to 1 previous error; 2 warnings emitted
------------------------------------------

---- [run-make] tests/run-make/incremental-finalize-fail stdout end ----

failures:
    [run-make] tests/run-make/incremental-finalize-fail

test result: FAILED. 147 passed; 1 failed; 320 ignored; 0 measured; 0 filtered out; finished in 41.86s

@rust-bors rust-bors bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 27, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 27, 2026

💔 Test for 79934c8 failed: CI. Failed job:

@rust-bors rust-bors bot 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 Mar 27, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 27, 2026

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

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 27, 2026

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

@jhpratt jhpratt closed this Mar 27, 2026
@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 Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs rollup A PR which is a rollup 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.