Skip to content

Rollup of 12 pull requests #145680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from
Closed

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Aug 20, 2025

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fee1-dead and others added 28 commits July 3, 2025 23:43
Add a few links to the collections mentioned in the module doc for Collections.
Just like we implemented relatively complex rules to imply other extensions
**from** "C" (and some others), this commit implements implication
**to** the "C" extension from others, complying the following text
in the ISA Manual (although there's no direct imply/depend references).

> The C extension is the superset of the following extensions:
>
> - Zca
> - Zcf if F is specified (RV32 only)
> - Zcd if D is specified

This is formally verified so that no other extension combinations
(*not* in this implementation) can (currently) imply the "C" extension.
This uses the feature gate for
rust-lang#143352, but is described in
rust-lang/rfcs#3820 which is strongly tied to
the experiment.
…egen-backend` and `--override-codegen-backend`
…t while proving a where-clause

Signed-off-by: xizheyin <[email protected]>
…y, r=dtolnay

stabilize `const_array_each_ref`

cc rust-lang#133289, needs FCP.
…r-width, r=Noratrieb

Make target pointer width in target json an integer

r? Noratrieb
cc `@RalfJung` (https://github.com/rust-lang/rust/pull/142352/files#r2230380120)
[Doc] Add links to the various collections

Add a few links to the collections mentioned in the module doc for Collections.
…quality, r=WaffleLapkin,lcnr

Defer tail call ret ty equality to check_tail_calls

Fixes rust-lang#144892.

Currently the tail call signature check assumes that return types have been accounted for. However, this is not complete for several reasons.

Firstly, we were using subtyping instead of equality in the HIR typeck code:

https://github.com/rust-lang/rust/blob/e1b9081e699065badfc1a9419ec9566e5c8615c4/compiler/rustc_hir_typeck/src/expr.rs#L1096

We could fix this, but it doesn't really do much for us anyways since HIR typeck doesn't care about regions.

That means, secondly, we'd need to fix the terminator type check in MIR typeck to account for variances, since tail call terminators need to relate their arguments invariantly to account for the "signature must be equal" rule. This seems annoying.

All of this seems like a lot of work, and we already are *manually* checking argument equality. Let's just extend the `check_tail_calls` to account for mismatches in return types anyways.

r? ``@WaffleLapkin``
…gen-backend, r=Kobzol,bjorn3

Add new `--test-codegen-backend` bootstrap option

This new bootstrap command line flag allows to do:

```shell
./x.py test tests/ui/intrinsics/panic-uninitialized-zeroed.rs --stage 1 -j8 --test-codegen-backend gcc
```

This is the last step before running it into the CI.

Supersedes rust-lang#144687.

r? ``@Kobzol``
…nieu

std_detect: RISC-V: implement implication to "C"

Just like we implemented relatively complex rules to imply other extensions **from** "C" (and some others), this commit implements implication **to** the "C" extension from others, complying the following text in the ISA Manual (although there's no direct imply/depend references).

> The C extension is the superset of the following extensions:
>
> - Zca
> - Zcf if F is specified (RV32 only)
> - Zcd if D is specified

This is formally verified so that no other extension combinations (*not* in this implementation) can (currently) imply the "C" extension.

Note: this is a `std_detect` change and not main target feature handling.
…re, r=davidtwco

Add an experimental unsafe(force_target_feature) attribute.

This uses the feature gate for rust-lang#143352, but is described in rust-lang/rfcs#3820 which is strongly tied to the experiment.
Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause

Partially fix rust-lang#145611, but we should do something make cycle in this situation ICE.

Instead of using a query, call `&tcx.resolutions(()).effective_visibilities`.

r? `@lcnr`

cc `@compiler-errors`
…ts-path, r=fmease

Fix JS search scripts path

`rootPath` always end with a `/` so we should not add one. Interestingly enough, it only triggers the bug on a website (like https://doc.rust-lang.org/nightly/std/).

Follow-up of rust-lang#144476.
Fixes rust-lang#145646.

cc `@notriddle`
r? `@fmease`
Download CI GCC into the correct directory

While doing various experiments with stage3 cross-compilations, I realized that bootstrap is unable to download LLVM from CI for a non-host target, which is quite annoying. Fixing this for LLVM will take some work, but in the meantime we can easily fix this for `download-ci-gcc`, which was implemented in a much more self-contained way.
…iler-errors

Enforce correct number of arguments for `"x86-interrupt"` functions

Tracking issue: rust-lang#40180

Partially fixes rust-lang#132835

`@rustbot` label: +F-abi_x86_interrupt +A-LLVM +O-x86_64 +O-x86_32 +A-ABI
…ce, r=Kobzol

Enable triagebot `[review-changes-since]` feature

This PR enables triagebot [`[review-changes-since]` feature](https://forge.rust-lang.org/triagebot/review-changes-since.html).

It's a complement to triagebot `[range-diff]` feature which adds at the end of a review body a link to view the changes that happened since the review.

Asked in [#t-compiler > Experimental range-diff for force-push @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Experimental.20range-diff.20for.20force-push/near/534963522)

r? Kobzol
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) labels Aug 20, 2025
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` 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. 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. rollup A PR which is a rollup labels Aug 20, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Aug 20, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

📌 Commit 68247ae has been approved by jhpratt

It is now in the queue for this repository.

@bors bors 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 Aug 20, 2025
@bors
Copy link
Collaborator

bors commented Aug 20, 2025

⌛ Testing commit 68247ae with merge 5bea2c6...

bors added a commit that referenced this pull request Aug 20, 2025
Rollup of 12 pull requests

Successful merges:

 - #143383 (stabilize `const_array_each_ref`)
 - #144443 (Make target pointer width in target json an integer)
 - #144758 ([Doc] Add links to the various collections)
 - #144915 (Defer tail call ret ty equality to check_tail_calls)
 - #145256 (Add new `--test-codegen-backend` bootstrap option)
 - #145415 (std_detect: RISC-V: implement implication to "C")
 - #145573 (Add an experimental unsafe(force_target_feature) attribute.)
 - #145642 (Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause)
 - #145650 (Fix JS search scripts path)
 - #145654 (Download CI GCC into the correct directory)
 - #145662 (Enforce correct number of arguments for `"x86-interrupt"` functions)
 - #145674 (Enable triagebot `[review-changes-since]` feature)

Failed merges:

 - #145647 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@Kobzol Kobzol mentioned this pull request Aug 20, 2025
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-19-3 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
1 error[E0658]: the `#[force_target_feature]` attribute is an experimental feature
-   --> $DIR/feature-gate-effective-target-features.rs:12:5
+   --> $DIR/feature-gate-effective-target-features.rs:13:5
3    |
4 LL |     #[unsafe(force_target_feature(enable = "avx2"))]
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

9    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10 
11 error: `#[target_feature(..)]` cannot be applied to safe trait method
-   --> $DIR/feature-gate-effective-target-features.rs:20:5
+   --> $DIR/feature-gate-effective-target-features.rs:21:5
13    |
---
To only update this specific test, also pass `--test-args feature-gates/feature-gate-effective-target-features.rs`

error in revision `default`: 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/stage1/bin/rustc" "/checkout/tests/ui/feature-gates/feature-gate-effective-target-features.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/stage1" "--target=x86_64-unknown-linux-gnu" "--cfg" "default" "--check-cfg" "cfg(test,FALSE,default,feature)" "--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/feature-gates/feature-gate-effective-target-features.default" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0658]: the `#[force_target_feature]` attribute is an experimental feature
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-effective-target-features.rs:13:5
   |
LL |     #[unsafe(force_target_feature(enable = "avx2"))]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #143352 <https://github.com/rust-lang/rust/issues/143352> for more information
   = help: add `#![feature(effective_target_features)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: `#[target_feature(..)]` cannot be applied to safe trait method
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-effective-target-features.rs:21:5
   |
LL |     #[target_feature(enable = "avx2")]
---
  --> /checkout/tests/ui/feature-gates/feature-gate-effective-target-features.rs:7:5
   |
LL |     fn foo(&self);
   |     ^^^^^^^^^^^^^^
   = note: expected signature `fn(&Bar2)`
              found signature `#[target_features] fn(&Bar2)`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0053, E0658.
For more information about an error, try `rustc --explain E0053`.
---
To only update this specific test, also pass `--test-args feature-gates/feature-gate-effective-target-features.rs`

error in revision `feature`: 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/stage1/bin/rustc" "/checkout/tests/ui/feature-gates/feature-gate-effective-target-features.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/stage1" "--target=x86_64-unknown-linux-gnu" "--cfg" "feature" "--check-cfg" "cfg(test,FALSE,default,feature)" "--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/feature-gates/feature-gate-effective-target-features.feature" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
warning: the feature `effective_target_features` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning]  --> /checkout/tests/ui/feature-gates/feature-gate-effective-target-features.rs:3:30
   |
---
  --> /checkout/tests/ui/feature-gates/feature-gate-effective-target-features.rs:7:5
   |
LL |     fn foo(&self);
   |     ^^^^^^^^^^^^^^
   = note: expected signature `fn(&Bar2)`
              found signature `#[target_features] fn(&Bar2)`

error: aborting due to 2 previous errors; 1 warning emitted

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

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

💔 Test failed - checks-actions

@bors bors 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 Aug 20, 2025
@jhpratt jhpratt closed this Aug 20, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 20, 2025
@jhpratt jhpratt deleted the rollup-cokwvpc branch August 20, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` 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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.