Skip to content

Rollup of 7 pull requests#154448

Closed
Zalathar wants to merge 20 commits intorust-lang:mainfrom
Zalathar:rollup-mBQIv8t
Closed

Rollup of 7 pull requests#154448
Zalathar wants to merge 20 commits intorust-lang:mainfrom
Zalathar:rollup-mBQIv8t

Conversation

@Zalathar
Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

RalfJung and others added 20 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.
```
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
…bzol

bootstrap: force a CI LLVM stamp bump

To see if this helps with rust-lang#154408

r? @Kobzol
…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.
…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 27, 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-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 Mar 27, 2026
@Zalathar
Copy link
Copy Markdown
Member Author

Rollup of everything.

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 27, 2026

📌 Commit 312b10e has been approved by Zalathar

It is now in the queue for this repository.

@rust-bors rust-bors bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 27, 2026
@rust-bors rust-bors bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 27, 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`)
 - #154441 (bootstrap: force a CI LLVM stamp bump)
 - #153662 (Suggest fully qualified path on method name collision)
 - #153675 (simd_add/sub/mul/neg: document overflow behavior)
 - #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)
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mismatched_types/diagnostic-method-lookup-returns-sig-with-fewer-args/diagnostic-method-lookup-returns-sig-with-fewer-args.stderr`
diff of stderr:

16    |
17 LL |     target.get(10.0); // (used to crash here)
18    |            ^^^ refers to `Target::get`
-    = note: additionally, there is 1 other available method that isn't in scope
- help: you might have meant to call one of the other methods; you can use the fully-qualified path to call one of them explicitly
21    |
22 LL -     target.get(10.0); // (used to crash here)
23 LL +     <_ as std::slice::SliceIndex<_>>::get(target, 10.0); // (used to crash here)

24    |
25 LL -     target.get(10.0); // (used to crash here)
- LL +     <_ as object::read::elf::relocation::Relr>::get(&target, 10.0); // (used to crash here)
27    |
28 
29 error: aborting due to 1 previous error


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args mismatched_types/diagnostic-method-lookup-returns-sig-with-fewer-args.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/mismatched_types/diagnostic-method-lookup-returns-sig-with-fewer-args.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=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=wasm32-wasip1" "--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" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mismatched_types/diagnostic-method-lookup-returns-sig-with-fewer-args" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-wasip1/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/mismatched_types/diagnostic-method-lookup-returns-sig-with-fewer-args.rs:4:16
   |
LL |     target.get(10.0); // (used to crash here)
   |            --- ^^^^ expected `i32`, found floating-point number
   |            |
   |            arguments to this method are incorrect
   |
note: method defined here
  --> /checkout/tests/ui/mismatched_types/diagnostic-method-lookup-returns-sig-with-fewer-args.rs:22:12
   |
LL |     pub fn get(&self, data: i32) {
   |            ^^^        ---------
note: the `get` call is resolved to the method in `Target`, shadowing the method of the same name on trait `RandomTrait`
  --> /checkout/tests/ui/mismatched_types/diagnostic-method-lookup-returns-sig-with-fewer-args.rs:4:12
   |
LL |     target.get(10.0); // (used to crash here)
   |            ^^^ refers to `Target::get`
help: you might have meant to call the other method; you can use the fully-qualified path to call it explicitly
   |
LL -     target.get(10.0); // (used to crash here)
LL +     <_ as std::slice::SliceIndex<_>>::get(target, 10.0); // (used to crash here)
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.

@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 395d079 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 #153662, which is a member of this rollup, was unapproved.

@Zalathar Zalathar 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
@Zalathar Zalathar deleted the rollup-mBQIv8t branch March 27, 2026 06:17
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-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.

10 participants