Skip to content

Rollup of 5 pull requests#158465

Closed
jhpratt wants to merge 14 commits into
rust-lang:mainfrom
jhpratt:rollup-cSDLvEL
Closed

Rollup of 5 pull requests#158465
jhpratt wants to merge 14 commits into
rust-lang:mainfrom
jhpratt:rollup-cSDLvEL

Conversation

@jhpratt

@jhpratt jhpratt commented Jun 27, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

mu001999 and others added 14 commits June 8, 2026 17:14
A recent LLVM change causes some changes here, if I'm understanding
correctly it allows some better latency reduction. From what I can tell,
this test doesn't care that only a single register is used, so we use
-DAG instead of -NEXT to allow some instruction reordering.

By happy coincidence, the z10 and z13 code matches now, which collapsed
some of the test lines. I'm happy to split them back out if that's bad
for some reason though!
To explain some non-obvious things that took me some time to work out.
`EarlyLintPassObjects` is an old name.
As `*CombinedLateLintModPass`, because that matches things like
`late_lint_mod`.
We generally write `lint_pass`/`LintPass`. This commit renames some
things that only use `pass`/`Pass`. And also some `s/module/mod`
changes, too.
There are `register_*_lint_pass` methods, might as well go through them.
…le_trait, r=chenyukang

Cross-referencing tuple_trait tracking issue, source and the Unstable Book
Use infer tys for synthetic params when lowering const paths point to fns

```rust
#![feature(min_generic_const_args)]

trait Trait {}
impl<'t> Trait for [(); N] {}
fn N(arg: impl Trait) {}
```

1. `arg: impl Trait` implies a synthetic param `<impl Trait>` and the obligation `_: Trait`;
2. when matching `impl Trait for [(); N]`, lowering const arg `N` fills in that synthetic param, so the impl header contains `<[(); N::<impl Trait>] as Trait>`;
3. then instantiating this header with the impl's args causing a param/arg mismatch and ICE.

This PR uses infer tys for synthetic params. Although this will emit the error in `ItemCtxt` because infer tys are not allowed here. I think that is reasonable, because `N` omits the synthetic parameter, though we cannot write the ty explicitly anywhere.

Fixes rust-lang#155834
…itor

tests: modify s390x vector test to be robust to instruction scheduling

A recent LLVM change causes some changes here, if I'm understanding correctly it allows some better latency reduction. From what I can tell, this test doesn't care that only a single register is used, so we use -DAG instead of -NEXT to allow some instruction reordering.

By happy coincidence, the z10 and z13 code matches now, which collapsed some of the test lines. I'm happy to split them back out if that's bad for some reason though!
…Urgau

More lint cleanups

Details in individual commits.

r? Urgau
…hnTitor

Add missing links in integer docs

Saw some missing links while browsing the docs so fixed that.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 27, 2026
@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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 Jun 27, 2026
@jhpratt

jhpratt commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 4651d2d has been approved by jhpratt

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 27, 2026
Rollup of 5 pull requests

Successful merges:

 - #158234 (Cross-referencing tuple_trait tracking issue, source and the Unstable Book)
 - #157625 (Use infer tys for synthetic params when lowering const paths point to fns)
 - #158306 (tests: modify s390x vector test to be robust to instruction scheduling)
 - #158431 (More lint cleanups)
 - #158452 (Add missing links in integer docs)
@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 Jun 27, 2026
@rust-bors

rust-bors Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 445347e failed: CI. Failed job:

@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 Jun 27, 2026
@jhpratt jhpratt closed this Jun 27, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 27, 2026
@rust-bors

rust-bors Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

PR #157625, which is a member of this rollup, was 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 27, 2026
@jhpratt jhpratt deleted the rollup-cSDLvEL branch June 27, 2026 05:35
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job 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)

+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
+   --> $DIR/synth-gen-arg-ice-158152.rs:6:16
+    |
+ LL | impl A<[usize; fn_item]> for () {}
+    |                ^^^^^^^ not allowed in type signatures
+ 
1 error[E0747]: type provided when a constant was expected
2   --> $DIR/synth-gen-arg-ice-158152.rs:8:26
3    |

9 LL | fn fn_item(_: impl Trait<{ usize }>) {}
10    |                          +       +
11 
- error: aborting due to 1 previous error
+ error: aborting due to 2 previous errors
13 
---
-   --> /checkout/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs:6:16
+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
+   --> $DIR/synth-gen-arg-ice-158152.rs:6:16
+    |
+ LL | impl A<[usize; fn_item]> for () {}
+    |                ^^^^^^^ not allowed in type signatures
+ 
+ error: aborting due to 2 previous errors
+ Some errors have detailed explanations: E0121, E0747.
+ For more information about an error, try `rustc --explain E0121`.
---
To only update this specific test, also pass `--test-args const-generics/mgca/synth-gen-arg-ice-158152.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/const-generics/mgca/synth-gen-arg-ice-158152.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/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/const-generics/mgca/synth-gen-arg-ice-158152" "-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 -------------------------------
error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
##[error]  --> /checkout/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs:6:16
   |
LL | impl A<[usize; fn_item]> for () {}
   |                ^^^^^^^ not allowed in type signatures

error[E0747]: type provided when a constant was expected
##[error]  --> /checkout/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs:8:26
   |
LL | fn fn_item(_: impl Trait<usize>) {}
   |                          ^^^^^
   |
help: if this generic argument was intended as a const parameter, surround it with braces
   |
LL | fn fn_item(_: impl Trait<{ usize }>) {}
   |                          +       +

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0121, E0747.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job 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)

+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
+   --> $DIR/synth-gen-arg-ice-158152.rs:6:16
+    |
+ LL | impl A<[usize; fn_item]> for () {}
+    |                ^^^^^^^ not allowed in type signatures
+ 
1 error[E0747]: type provided when a constant was expected
2   --> $DIR/synth-gen-arg-ice-158152.rs:8:26
3    |

9 LL | fn fn_item(_: impl Trait<{ usize }>) {}
10    |                          +       +
11 
- error: aborting due to 1 previous error
+ error: aborting due to 2 previous errors
13 
---
-   --> /checkout/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs:6:16
+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
+   --> $DIR/synth-gen-arg-ice-158152.rs:6:16
+    |
+ LL | impl A<[usize; fn_item]> for () {}
+    |                ^^^^^^^ not allowed in type signatures
+ 
+ error: aborting due to 2 previous errors
+ Some errors have detailed explanations: E0121, E0747.
+ For more information about an error, try `rustc --explain E0121`.
---
To only update this specific test, also pass `--test-args const-generics/mgca/synth-gen-arg-ice-158152.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/const-generics/mgca/synth-gen-arg-ice-158152.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" "--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/const-generics/mgca/synth-gen-arg-ice-158152" "-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 -------------------------------
error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
##[error]  --> /checkout/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs:6:16
   |
LL | impl A<[usize; fn_item]> for () {}
   |                ^^^^^^^ not allowed in type signatures

error[E0747]: type provided when a constant was expected
##[error]  --> /checkout/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs:8:26
   |
LL | fn fn_item(_: impl Trait<usize>) {}
   |                          ^^^^^
   |
help: if this generic argument was intended as a const parameter, surround it with braces
   |
LL | fn fn_item(_: impl Trait<{ usize }>) {}
   |                          +       +

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0121, E0747.

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

Labels

A-rustc-dev-guide Area: rustc-dev-guide rollup A PR which is a rollup T-clippy Relevant to the Clippy team. 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.

8 participants