Skip to content

Rollup of 23 pull requests#157827

Closed
JonathanBrouwer wants to merge 63 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-vNWafp4
Closed

Rollup of 23 pull requests#157827
JonathanBrouwer wants to merge 63 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-vNWafp4

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

estebank and others added 30 commits May 16, 2026 00:43
```
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.
Update the target spec & relevant documentation for
aarch64-unknown-freebsd to reflect it being promoted to Tier 2.

Implements MCP: rust-lang/compiler-team#961

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
`-Zremap-cwd-prefix=<to>` was applied inside `parse_remap_path_prefix`, which
resolved `std::env::current_dir()` and pushed `(cwd, to)` onto
`remap_path_prefix`. That option is `[TRACKED_NO_CRATE_HASH]`, so the absolute
working directory entered the incremental command-line-args hash, and building
the same sources from a different directory (e.g. a Bazel sandbox, whose path
contains a per-action counter) purged the whole incremental cache even though the
remapped output is identical.

`--remap-path-prefix` and `-Zremap-cwd-prefix` already have separate options
(`remap_path_prefix` and `remap_cwd_prefix`). Keep each option holding exactly its
own flag, and apply `-Zremap-cwd-prefix` in `file_path_mapping` -- i.e. when
building the (untracked) applied `FilePathMapping` -- rather than when
parsing/tracking options. The absolute cwd then lives only in the runtime mapping,
never in a tracked field.

Output is unchanged (the cwd entry is still appended last). Tracking stays sound:
the cwd's effect is tracked via `remap_cwd_prefix` (the target prefix baked into
output) and `working_dir` (whose `RealFileName` hash includes the real path only
when it was not fully remapped, i.e. exactly when the cwd can leak into output).
The stable `--remap-path-prefix` flag is unchanged in data and in tracking.

A unit test guards against the cwd being merged back into `remap_path_prefix`.
This is virtually the same target as the existing -gnu target, but using
the ELFv2 ABI instead of the ELFv1 ABI and made possible now that we
expose target_abi = "elfv1" or "elfv2" on the 64-bit PowerPC targets.
- `RegionInferenceContext::init_free_and_bound_regions()` is inlined into `::new()` and pulled to before initial SCC values are assigned
- A couple of iteration-then-index patterns are changed into `iter_enumerated()`-style patterns
- Some leftover code comments are removed and revised to actually describe the initialisation
- Free regions are now marked as live everywhere in liveness constraints, then copied to scc_values upon initialisation, avoiding performing that logic twice

It should do strictly less work, but almost all of it would only happen on free regions, and there shouldn't be large numbers of those. Depending on the cleverness of the optimiser most of the option/some checks should have been compiled away anyway.

The key advantage as I see it is clearer flow: first liveness constraints are set up, then initial values are initialised, then region inference is ready to run.
To make the distinction clearer versus `macos-26` runners in preparation
of experimenting with running `macos-26` runners in parallel.
Which mirrors the `aarch64-apple` `macos-15` runner image based
workloads, but run on `macos-26` runner image, to evaluate running
times.

See RUST-157687.
Co-authored-by: Ralf Jung <post@ralfj.de>
Mostly replaces a few `format!` calls with `format_args!`
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 12, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI 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 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-infra Relevant to the infrastructure 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) labels Jun 12, 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

rust-bors Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a99173f 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 Jun 12, 2026
@rust-bors

rust-bors Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit a99173f with merge ae6b3dc

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/27431584449

rust-bors Bot pushed a commit that referenced this pull request Jun 12, 2026
Rollup of 23 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 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

Compare output by lines enabled, diff by lines:
Expected contains these lines that are not in actual:
   = note: additionally, there is 1 other available method that isn't in scope
LL +     <_ as object::read::elf::relocation::Relr>::get(&target, 10.0); // (used to crash here)
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
Actual contains these lines that are not in expected:
(no lines found)

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-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 12, 2026
@rust-bors

rust-bors Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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

This rollup was thus 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 Jun 12, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors

rust-bors Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI 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 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-infra Relevant to the infrastructure 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.