Skip to content

Rollup of 8 pull requests - #163164

Closed
JonathanBrouwer wants to merge 27 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-i32xNt1
Closed

JonathanBrouwer wants to merge 27 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-i32xNt1

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

mejrs and others added 27 commits September 2, 2026 12:39
…able during PostTypeckUntilBorrowck for auto trait opaque ty
… r=lcnr

Move `Const` from `rustc_middle` to `rustc_type_ir`

Split by commit;
- Firstly move the type and methods
- From `I::Const` -> `Const<I>`
- Import `ConstExt` in all places that require the extension trait methods in compiler
- Import `ConstExt` in all places that require the extension trait methods in clippy

r? @lcnr
…=lcnr

Avoid leaking opaque hidden types via auto trait candidates

closes: rust-lang#134578
macro_metavar_expr_concat: support concatenating into string literals

Usually if you want to concatenate string literals in macros you expand into some combination of concat! and stringify! invocations. However this does not work in nested MetaItems, since those are never expanded (unlike `#[path = EXPR]` attributes like `#[doc = include_str!("README.md")]`.

This PR adds support for that using `${concat_str(...)}`, similar to `${concat(...)}`. It is unstable under the same `macro_metavar_expr_concat` feature. See the tests in this PR for examples.

My motivation for adding this is that I've seen (and had myself) some cases where this would have been really useful. Thus I'd like to add this experimentally.
powerpc64-ibm-aix: fix cfg(target_abi) value

Our powerpc64-ibm-aix target currently sets `cfg_abi` to "vec-extabi", which means that programs compiled for this target *think* they use that ABI. Even our inline asm logic trusts this field. But that's a lie, we're actually using the default ABI since we are never setting `EnableAIXExtendedAltivecABI` on the LLVM side. We should fix that discrepancy.

Between changing how we generate the code, and changing the label we put into `cfg_abi`, the latter is the less risky change. So let's do that.

This has been tried before in rust-lang#153830. We then decided to wait a bit while the target maintainers investigate whether they want to change the ABI or not. I think we have waited long enough. The last comment from them that I found is [this one](rust-lang#153876 (comment)) which says "I'd conclude the extend vector ABI should be disabled for now"; there have been further questions but no further communication. We can always still change the ABI in the future, but for now let's fix the obvious bug where the ABI we report in `cfg_abi` does not match the actual ABI we are compiling for.

Cc @Gelbpunkt @daltenty @gilamn5tr @amy-kwan @taiki-e
…=fee1-dead

regression test for GCE inherent projection ICE

Closes rust-lang#159561
The issue no longer reproduces
windows Dir::rename: remove incorrect is_dir query

Hopefully fixes rust-lang#163022
r? @ChrisDenton

try-jobs: test-x86_64-msvc-1
…constants, r=clarfonthey

feat(time): add `Duration::{WEEK, DAY, HOUR, MINUTE}`

- Tracking issue: rust-lang#57391

This pull request adds associated constants for representing one week, one day, one hour, or one minute to `Duration`.

In the same way as rust-lang#162195 and rust-lang#162199, the exact number of seconds corresponding to one week, one day, one hour, and one minute are clearly specified in the documentation. Documentation tests are used to verify the correctness of these descriptions.

I initially proposed this as an ACP. However, the `duration_constants` feature is still unstable, and the ACP simply adds associated constants for units larger than the second to the feature, I determined that it could be incorporated into the feature.

By making `Duration::WEEK` and `Duration::DAY` dependent on the `duration_constructors` feature, these associated constants can be removed if `Duration::from_weeks` and `Duration::from_days` are not stabilized. Therefore, even if the `duration_constructors` feature is not stabilized, the `duration_constants` feature can be stabilized.

```rust
impl Duration {
    pub const WEEK: Duration = Duration::from_weeks(1);
    pub const DAY: Duration = Duration::from_days(1);
    pub const HOUR: Duration = Duration::from_hours(1);
    pub const MINUTE: Duration = Duration::from_mins(1);
}
```

- See also: rust-lang/libs-team#869
…=marcoieni

Remove unused `make3.sh` CI script

This file is unused so we can remove it.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 22, 2026
@rustbot rustbot added the A-CI Area: Our Github Actions CI label Sep 22, 2026
@rustbot rustbot added 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 PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. labels Sep 22, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,test-x86_64-gnu-aux,test-x86_64-gnu-llvm-21-3,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu

@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Sep 22, 2026
@rust-bors

rust-bors Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 516cc52 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 Sep 22, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 22, 2026
Rollup of 8 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-gnu-llvm-21-3
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)

9 error[E0277]: please do not the AAAAAA
10   --> $DIR/concat-str.rs:18:9
11    |
+ LL | macro_rules! make_stuff {
+ ...
12 LL |     foo(());
13    |     --- ^^ the trait `NewAAAAAA` is not implemented for `()`
14    |     |

27    |
28 LL | pub fn foo(x: impl NewAAAAAA) {}
29    |                    ^^^^^^^^^ required by this bound in `foo`
-    = note: this error originates in the macro `make_stuff` (in Nightly builds, run with -Z macro-backtrace for more info)
31 
32 error: aborting due to 1 previous error; 1 warning emitted
33 
---
To only update this specific test, also pass `--test-args macros/metavar-expressions/concat-str.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/stage1/bin/rustc" "/checkout/tests/ui/macros/metavar-expressions/concat-str.rs" "-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" "--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/macros/metavar-expressions/concat-str" "-Znext-solver=coherence" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_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: use of deprecated trait `NewAAAAAA`: blah blah blah AAAAAA trait
##[warning]  --> /checkout/tests/ui/macros/metavar-expressions/concat-str.rs:14:20
   |
LL | pub fn foo(x: impl NewAAAAAA) {}
   |                    ^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

error[E0277]: please do not the AAAAAA
##[error]  --> /checkout/tests/ui/macros/metavar-expressions/concat-str.rs:18:9
   |
LL | macro_rules! make_stuff {
...
LL |     foo(());
   |     --- ^^ the trait `NewAAAAAA` is not implemented for `()`
   |     |
   |     required by a bound introduced by this call
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/macros/metavar-expressions/concat-str.rs:8:9
   |
LL |         pub trait ${concat(New, $name)} {}
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | make_stuff!("blah blah blah", AAAAAA);
   | ------------------------------------- in this macro invocation
note: required by a bound in `foo`
  --> /checkout/tests/ui/macros/metavar-expressions/concat-str.rs:14:20
   |
LL | pub fn foo(x: impl NewAAAAAA) {}
   |                    ^^^^^^^^^ required by this bound in `foo`

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

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

@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 Sep 22, 2026
@rust-bors

rust-bors Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

PR #160570, 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 Sep 22, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

9 error[E0277]: please do not the AAAAAA
10   --> $DIR/concat-str.rs:18:9
11    |
+ LL | macro_rules! make_stuff {
+ ...
12 LL |     foo(());
13    |     --- ^^ the trait `NewAAAAAA` is not implemented for `()`
14    |     |

27    |
28 LL | pub fn foo(x: impl NewAAAAAA) {}
29    |                    ^^^^^^^^^ required by this bound in `foo`
-    = note: this error originates in the macro `make_stuff` (in Nightly builds, run with -Z macro-backtrace for more info)
31 
32 error: aborting due to 1 previous error; 1 warning emitted
33 
---
To only update this specific test, also pass `--test-args macros/metavar-expressions/concat-str.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/metavar-expressions/concat-str.rs" "-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/macros/metavar-expressions/concat-str" "-Znext-solver=coherence" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
warning: use of deprecated trait `NewAAAAAA`: blah blah blah AAAAAA trait
##[warning]  --> /checkout/tests/ui/macros/metavar-expressions/concat-str.rs:14:20
   |
LL | pub fn foo(x: impl NewAAAAAA) {}
   |                    ^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

error[E0277]: please do not the AAAAAA
##[error]  --> /checkout/tests/ui/macros/metavar-expressions/concat-str.rs:18:9
   |
LL | macro_rules! make_stuff {
...
LL |     foo(());
   |     --- ^^ the trait `NewAAAAAA` is not implemented for `()`
   |     |
   |     required by a bound introduced by this call
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/macros/metavar-expressions/concat-str.rs:8:9
   |
LL |         pub trait ${concat(New, $name)} {}
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | make_stuff!("blah blah blah", AAAAAA);
   | ------------------------------------- in this macro invocation
note: required by a bound in `foo`
  --> /checkout/tests/ui/macros/metavar-expressions/concat-str.rs:14:20
   |
LL | pub fn foo(x: impl NewAAAAAA) {}
   |                    ^^^^^^^^^ required by this bound in `foo`

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

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

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 22, 2026
@rust-bors

rust-bors Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 497a432 failed: CI. Failed jobs:

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 PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. 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. 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.

10 participants