Skip to content

Rollup of 6 pull requests#158474

Closed
jhpratt wants to merge 16 commits into
rust-lang:mainfrom
jhpratt:rollup-cqpHs8u
Closed

Rollup of 6 pull requests#158474
jhpratt wants to merge 16 commits into
rust-lang:mainfrom
jhpratt:rollup-cqpHs8u

Conversation

@jhpratt

@jhpratt jhpratt commented Jun 27, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

durin42 and others added 16 commits June 23, 2026 10:47
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.
…ected-pointer-deref, r=mu001999

Add regression test for unexpected pointer dereference issue

I try to pick up rust-lang#154568 and found it's fixed by rust-lang@4767f23.

Fixes rust-lang#154568

cc @adwinwhite
@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) 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 ad84fa2 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 6 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)
 - #158472 (Add regression test for unexpected pointer dereference issue)
@rust-bors rust-bors Bot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 27, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 27, 2026
@rust-bors

rust-bors Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

💔 Test for e38da4f failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

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

---- [codegen] tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs:17:12: error: CHECK: expected string not found in input
 // CHECK: [[RET:%.*]] = load i32, ptr [[INNER]]
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll:11:24: note: scanning from here
 %_7 = load ptr, ptr %x, align 8, !nonnull !4, !noundef !4
                       ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll:11:24: note: with "INNER" equal to "%_7"
 %_7 = load ptr, ptr %x, align 8, !nonnull !4, !noundef !4
                       ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll:15:2: note: possible intended match here
 %_4 = load i32, ptr %_6, align 4, !noundef !4
 ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll
Check file: /checkout/tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'issue_107681_unwrap_unchecked.67fd71670d665894-cgu.0' 
            2: source_filename = "issue_107681_unwrap_unchecked.67fd71670d665894-cgu.0" 
            3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" 
            4: target triple = "x86_64-unknown-linux-gnu" 
            5:  
            6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: write, target_mem0: none, target_mem1: none) uwtable 
            7: define noundef i32 @foo(ptr noalias nofree noundef align 8 captures(none) dereferenceable(16) %x) unnamed_addr #0 { 
            8: start: 
            9:  %0 = getelementptr inbounds nuw i8, ptr %x, i64 8 
           10:  %_6 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 
           11:  %_7 = load ptr, ptr %x, align 8, !nonnull !4, !noundef !4 
check:17'0                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
check:17'1                                                                 with "INNER" equal to "%_7"
           12:  %_8 = icmp ne ptr %_6, %_7 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           13:  %_14 = getelementptr inbounds nuw i8, ptr %_6, i64 4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           14:  store ptr %_14, ptr %0, align 8 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           15:  %_4 = load i32, ptr %_6, align 4, !noundef !4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:17'2      ?                                              possible intended match
           16:  tail call void @llvm.assume(i1 %_8) 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           17:  ret i32 %_4 
check:17'0     ~~~~~~~~~~~~~
           18: } 
check:17'0     ~~
           19:  
check:17'0     ~
           20: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           21: declare void @llvm.assume(i1 noundef) #1 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           22:  
check:17'0     ~
           23: attributes #0 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: write, target_mem0: none, target_mem1: none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           24: attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           25:  
check:17'0     ~
           26: !llvm.module.flags = !{!0, !1, !2} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           27: !llvm.ident = !{!3} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           28:  
check:17'0     ~
           29: !0 = !{i32 8, !"PIC Level", i32 2} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           30: !1 = !{i32 2, !"RtLibUseGOT", i32 1} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           31: !2 = !{i32 7, !"uwtable", i32 2} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           32: !3 = !{!"rustc version 1.98.0-nightly (e38da4fa9 2026-06-27)"} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           33: !4 = !{} 
check:17'0     ~~~~~~~~~
>>>>>>

------------------------------------------

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-22/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll" "/checkout/tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100" "--implicit-check-not" "br {{.*}}" "--implicit-check-not" "select"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs:17:12: error: CHECK: expected string not found in input
 // CHECK: [[RET:%.*]] = load i32, ptr [[INNER]]
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll:11:24: note: scanning from here
 %_7 = load ptr, ptr %x, align 8, !nonnull !4, !noundef !4
                       ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll:11:24: note: with "INNER" equal to "%_7"
 %_7 = load ptr, ptr %x, align 8, !nonnull !4, !noundef !4
                       ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll:15:2: note: possible intended match here
 %_4 = load i32, ptr %_6, align 4, !noundef !4
 ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll
Check file: /checkout/tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'issue_107681_unwrap_unchecked.67fd71670d665894-cgu.0' 
            2: source_filename = "issue_107681_unwrap_unchecked.67fd71670d665894-cgu.0" 
            3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" 
            4: target triple = "x86_64-unknown-linux-gnu" 
            5:  
            6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: write, target_mem0: none, target_mem1: none) uwtable 
            7: define noundef i32 @foo(ptr noalias nofree noundef align 8 captures(none) dereferenceable(16) %x) unnamed_addr #0 { 
            8: start: 
            9:  %0 = getelementptr inbounds nuw i8, ptr %x, i64 8 
           10:  %_6 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 
           11:  %_7 = load ptr, ptr %x, align 8, !nonnull !4, !noundef !4 
check:17'0                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
check:17'1                                                                 with "INNER" equal to "%_7"
           12:  %_8 = icmp ne ptr %_6, %_7 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           13:  %_14 = getelementptr inbounds nuw i8, ptr %_6, i64 4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           14:  store ptr %_14, ptr %0, align 8 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           15:  %_4 = load i32, ptr %_6, align 4, !noundef !4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:17'2      ?                                              possible intended match
           16:  tail call void @llvm.assume(i1 %_8) 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           17:  ret i32 %_4 
check:17'0     ~~~~~~~~~~~~~
           18: } 
check:17'0     ~~
           19:  
check:17'0     ~
           20: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           21: declare void @llvm.assume(i1 noundef) #1 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           22:  
check:17'0     ~
           23: attributes #0 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: write, target_mem0: none, target_mem1: none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           24: attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           25:  
check:17'0     ~
           26: !llvm.module.flags = !{!0, !1, !2} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           27: !llvm.ident = !{!3} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           28:  
check:17'0     ~
           29: !0 = !{i32 8, !"PIC Level", i32 2} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           30: !1 = !{i32 2, !"RtLibUseGOT", i32 1} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           31: !2 = !{i32 7, !"uwtable", i32 2} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           32: !3 = !{!"rustc version 1.98.0-nightly (e38da4fa9 2026-06-27)"} 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           33: !4 = !{} 
check:17'0     ~~~~~~~~~
>>>>>>
------------------------------------------

---- [codegen] tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs stdout end ----

@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
@rustbot rustbot 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

This pull request was unapproved due to being closed.

@jhpratt jhpratt deleted the rollup-cqpHs8u branch June 27, 2026 10:46
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 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-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