Skip to content

Rollup of 7 pull requests#154440

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

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

Conversation

@matthiaskrgr
Copy link
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
Member Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
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
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 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. 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.

9 participants