Skip to content

Rollup of 6 pull requests - #163033

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

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

Conversation

@jhpratt

@jhpratt jhpratt commented Sep 19, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

jchlanda and others added 14 commits September 18, 2026 08:55
Some pauth tests have ended up failing since they were not run in CI.
Make them run and make them pass.
Previously we would trigger on

1. `unsafe { 1, 2, 3 }` and suggest `[ { 1, 2, 3 ]` (sic!)
2. `'label: { 1, 2, 3 }` and suggest `[: { 1, 2, 3 ]` (sic!)
3. `X::<{ 1, 2, 3 }>` and suggest `X::<[ 1, 2, 3]>` (wrong)
4. `|| -> i32 { 1, 2, 3 }` and suggest `|| -> i32 [ 1, 2, 3 ]` (wrong)
5. `await { 1, 2, 3 }` and suggest `await [ 1, 2, 3 ]` (wrong)

Moreover, stop looking for identifiers after the `{` as that case can no
longer be reached anyway as `maybe_recover_bad_struct_literal_path`
will always snatch it first.
…r=Enselic

tests: Run more pauth tests in CI and make them pass

Some pauth tests have ended up failing since they were not run in CI.
Make them run and make them pass.

This is a follow up to: rust-lang#161183
…nBrouwer

Trigger "C array" parse error recovery in far fewer cases

Previously we would trigger on

1. `unsafe { 1, 2, 3 }` and suggest `[ { 1, 2, 3 ]` (sic!)
2. `'label: { 1, 2, 3 }` and suggest `[: { 1, 2, 3 ]` (sic!)
3. `X::<{ 1, 2, 3 }>` and suggest `X::<[ 1, 2, 3]>` (wrong)
4. `|| -> i32 { 1, 2, 3 }` and suggest `|| -> i32 [ 1, 2, 3 ]` (wrong)
5. `await { 1, 2, 3 }` and suggest `await [ 1, 2, 3 ]` (wrong)

Moreover, stop looking for identifiers after the `{` as that case can no longer be reached anyway as `maybe_recover_bad_struct_literal_path` will always snatch it first.

I haven't added any regression tests as I don't think it'd be worth it / proportionate (it's a niche parse error recovery gone awry in very odd cases). Let me know if you think otherwise.

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…chenyukang

recover `true` and `false` in type position as `bool`

Fixes rust-lang#162947

I asked for a bit of help in [#t-compiler/help > parser help with issue 162947](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/parser.20help.20with.20issue.20162947/with/625278094) and was advised to this solution.

This doesn't help if another keyword instead of `true` or `false` is used in type position, but i assume this is rare (don't think it has ever happened to me).
I also think this could lead to confusing error messages if the user has a type called `True` or `False`. When this then is typoed as lowercase it would be made to a bool. I assume this is also rare.

No AI used.
…e, r=folkertdev

Use `end_point` for trailing brace in `let...else` diagnostics

The following ICEs because `}` is a fullwidth lookalike of `}`:

```rs
fn main() {
    let x = {1} else { return; };
}
```

The diagnostic for a trailing curly brace before else in a let...else statement computed the brace span with `span.hi() - BytePos(1)`. That assumes the brace is a single ASCII byte.
add Dir::try_clone

There's no `try_clone` listed on rust-lang#120426 but I assume that's a standard operation for all kinds of file descriptors?

Cc @the8472 @ChrisDenton
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 19, 2026
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Sep 19, 2026
@jhpratt

jhpratt commented Sep 19, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors

rust-bors Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 35fab99 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 Sep 19, 2026
@rust-bors

This comment has been minimized.

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

Successful merges:

 - #162228 (tests: Run more pauth tests in CI and make them pass)
 - #162990 (post GH comment on types nominations)
 - #162705 (Trigger "C array" parse error recovery in far fewer cases)
 - #162988 (recover `true` and `false` in type position as `bool`)
 - #163006 (Use `end_point` for trailing brace in `let...else` diagnostics)
 - #163007 (add Dir::try_clone)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

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

---- [assembly] tests/assembly-llvm/pauth-basic.rs#aarch64_unknown_linux_pauthtest stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/assembly-llvm/pauth-basic.rs:35:11: error: CHECK: expected string not found in input
// CHECK: braaz [[PTR]]
          ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/pauth-basic.aarch64_unknown_linux_pauthtest/pauth-basic.s:44:12: note: scanning from here
 mov w0, w1
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/pauth-basic.aarch64_unknown_linux_pauthtest/pauth-basic.s:44:12: note: with "PTR" equal to "x8"
 mov w0, w1
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/pauth-basic.aarch64_unknown_linux_pauthtest/pauth-basic.s:45:3: note: possible intended match here
 blraaz x8
  ^
/checkout/tests/assembly-llvm/pauth-basic.rs:41:11: error: CHECK: expected string not found in input
---

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/pauth-basic.aarch64_unknown_linux_pauthtest/pauth-basic.s
Check file: /checkout/tests/assembly-llvm/pauth-basic.rs

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

Input was:
<<<<<<
            1:  .aeabi_subsection aeabi_pauthabi, required, uleb128 
            2:  .aeabi_attribute 1, 268435458 // Tag_PAuth_Platform 
            3:  .aeabi_attribute 2, 1791 // Tag_PAuth_Schema 
            4:  .section .note.gnu.property,"a",@note 
            5:  .p2align 3, 0x0 
            6:  .word 4 
            7:  .word 24 
            8:  .word 5 
            9:  .asciz "GNU" 
           10:  .word 3221225473 
           11:  .word 16 
           12:  .xword 268435458 
           13:  .xword 1791 
           14: .Lsec_end0: 
           15:  .text 
           16:  .file "pauth_basic.556c13cc599f4463-cgu.0" 
           17:  .section .text.c_func,"ax",@progbits 
           18:  .globl c_func 
           19:  .p2align 2 
           20:  .type c_func,@function 
           21: c_func: 
           22:  .cfi_startproc 
           23:  ret 
           24: .Lfunc_end0: 
           25:  .size c_func, .Lfunc_end0-c_func 
           26:  .cfi_endproc 
           27:  
           28:  .section .text.call_through,"ax",@progbits 
           29:  .globl call_through 
           30:  .p2align 2 
           31:  .type call_through,@function 
           32: call_through: 
           33:  .cfi_startproc 
           34:  .cfi_b_key_frame 
           35:  pacibsp 
           36:  .cfi_negate_ra_state 
           37:  stp x29, x30, [sp, #-16]! 
           38:  .cfi_def_cfa_offset 16 
           39:  mov x29, sp 
           40:  .cfi_def_cfa w29, 16 
           41:  .cfi_offset w30, -8 
           42:  .cfi_offset w29, -16 
           43:  mov x8, x0 
           44:  mov w0, w1 
check:35'0               {   search range start (exclusive)
check:35'1                   error: no match found in search range
check:35'2                   with "PTR" equal to "x8"
           45:  blraaz x8 
check:35'3       ?          possible intended match
           46:  .cfi_def_cfa wsp, 16 
           47:  ldp x29, x30, [sp], #16 
           48:  .cfi_def_cfa_offset 0 
           49:  .cfi_restore w30 
           50:  .cfi_restore w29 
           51:  retab 
           52: .Lfunc_end1: 
           53:  .size call_through, .Lfunc_end1-call_through 
           54:  .cfi_endproc 
           55:  
           56:  .section .text.call_c_func,"ax",@progbits 
           57:  .globl call_c_func 
           58:  .p2align 2 
           59:  .type call_c_func,@function 
           60: call_c_func: 
check:35'4                 }  search range end (exclusive)
           61:  .cfi_startproc 
           62:  .cfi_b_key_frame 
           63:  pacibsp 
           64:  .cfi_negate_ra_state 
           65:  stp x29, x30, [sp, #-16]! 
           66:  .cfi_def_cfa_offset 16 
           67:  mov x29, sp 
           68:  .cfi_def_cfa w29, 16 
           69:  .cfi_offset w30, -8 
           70:  .cfi_offset w29, -16 
           71:  mov w1, w0 
           72:  adrp x16, :got:c_func 
           73:  ldr x16, [x16, :got_lo12:c_func] 
           74:  paciza x16 
check:41'0               {   search range start (exclusive)
check:41'1                   error: no match found in search range
           75:  mov x0, x16 
check:41'2      ?             possible intended match
           76:  bl call_through 
           77:  .cfi_def_cfa wsp, 16 
           78:  ldp x29, x30, [sp], #16 
           79:  .cfi_def_cfa_offset 0 
           80:  .cfi_restore w30 
           81:  .cfi_restore w29 
           82:  retab 
           83: .Lfunc_end2: 
           84:  .size call_c_func, .Lfunc_end2-call_c_func 
           85:  .cfi_endproc 
           86:  
           87:  .ident "rustc version 1.100.0-nightly (0dbb171ba 2026-09-19)" 
           88:  .section ".note.GNU-stack","",@progbits 
check:41'3                                              } search range end (exclusive)
>>>>>>

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

error in revision `aarch64_unknown_linux_pauthtest`: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/pauth-basic.aarch64_unknown_linux_pauthtest/pauth-basic.s" "/checkout/tests/assembly-llvm/pauth-basic.rs" "--check-prefix=CHECK" "--check-prefix" "aarch64_unknown_linux_pauthtest" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/assembly-llvm/pauth-basic.rs:35:11: error: CHECK: expected string not found in input
// CHECK: braaz [[PTR]]
          ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/pauth-basic.aarch64_unknown_linux_pauthtest/pauth-basic.s:44:12: note: scanning from here
 mov w0, w1
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/pauth-basic.aarch64_unknown_linux_pauthtest/pauth-basic.s:44:12: note: with "PTR" equal to "x8"
 mov w0, w1
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/pauth-basic.aarch64_unknown_linux_pauthtest/pauth-basic.s:45:3: note: possible intended match here
 blraaz x8
  ^
/checkout/tests/assembly-llvm/pauth-basic.rs:41:11: error: CHECK: expected string not found in input
---

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/pauth-basic.aarch64_unknown_linux_pauthtest/pauth-basic.s
Check file: /checkout/tests/assembly-llvm/pauth-basic.rs

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

Input was:
<<<<<<
            1:  .aeabi_subsection aeabi_pauthabi, required, uleb128 
            2:  .aeabi_attribute 1, 268435458 // Tag_PAuth_Platform 
            3:  .aeabi_attribute 2, 1791 // Tag_PAuth_Schema 
            4:  .section .note.gnu.property,"a",@note 
            5:  .p2align 3, 0x0 
            6:  .word 4 
            7:  .word 24 
            8:  .word 5 
            9:  .asciz "GNU" 
           10:  .word 3221225473 
           11:  .word 16 
           12:  .xword 268435458 
           13:  .xword 1791 
           14: .Lsec_end0: 
           15:  .text 
           16:  .file "pauth_basic.556c13cc599f4463-cgu.0" 
           17:  .section .text.c_func,"ax",@progbits 
           18:  .globl c_func 
           19:  .p2align 2 
           20:  .type c_func,@function 
           21: c_func: 
           22:  .cfi_startproc 
           23:  ret 
           24: .Lfunc_end0: 
           25:  .size c_func, .Lfunc_end0-c_func 
           26:  .cfi_endproc 
           27:  
           28:  .section .text.call_through,"ax",@progbits 
           29:  .globl call_through 
           30:  .p2align 2 
           31:  .type call_through,@function 
           32: call_through: 
           33:  .cfi_startproc 
           34:  .cfi_b_key_frame 
           35:  pacibsp 
           36:  .cfi_negate_ra_state 
           37:  stp x29, x30, [sp, #-16]! 
           38:  .cfi_def_cfa_offset 16 
           39:  mov x29, sp 
           40:  .cfi_def_cfa w29, 16 
           41:  .cfi_offset w30, -8 
           42:  .cfi_offset w29, -16 
           43:  mov x8, x0 
           44:  mov w0, w1 
check:35'0               {   search range start (exclusive)
check:35'1                   error: no match found in search range
check:35'2                   with "PTR" equal to "x8"
           45:  blraaz x8 
check:35'3       ?          possible intended match
           46:  .cfi_def_cfa wsp, 16 
           47:  ldp x29, x30, [sp], #16 
           48:  .cfi_def_cfa_offset 0 
           49:  .cfi_restore w30 
           50:  .cfi_restore w29 
           51:  retab 
           52: .Lfunc_end1: 
           53:  .size call_through, .Lfunc_end1-call_through 
           54:  .cfi_endproc 
           55:  
           56:  .section .text.call_c_func,"ax",@progbits 
           57:  .globl call_c_func 
           58:  .p2align 2 
           59:  .type call_c_func,@function 
           60: call_c_func: 
check:35'4                 }  search range end (exclusive)
           61:  .cfi_startproc 
           62:  .cfi_b_key_frame 
           63:  pacibsp 
           64:  .cfi_negate_ra_state 
           65:  stp x29, x30, [sp, #-16]! 
           66:  .cfi_def_cfa_offset 16 
           67:  mov x29, sp 
           68:  .cfi_def_cfa w29, 16 
           69:  .cfi_offset w30, -8 
           70:  .cfi_offset w29, -16 
           71:  mov w1, w0 
           72:  adrp x16, :got:c_func 
           73:  ldr x16, [x16, :got_lo12:c_func] 
           74:  paciza x16 
check:41'0               {   search range start (exclusive)
check:41'1                   error: no match found in search range
           75:  mov x0, x16 
check:41'2      ?             possible intended match
           76:  bl call_through 
           77:  .cfi_def_cfa wsp, 16 
           78:  ldp x29, x30, [sp], #16 
           79:  .cfi_def_cfa_offset 0 
           80:  .cfi_restore w30 
           81:  .cfi_restore w29 
           82:  retab 
           83: .Lfunc_end2: 
           84:  .size call_c_func, .Lfunc_end2-call_c_func 
           85:  .cfi_endproc 
           86:  
           87:  .ident "rustc version 1.100.0-nightly (0dbb171ba 2026-09-19)" 
           88:  .section ".note.GNU-stack","",@progbits 
check:41'3                                              } search range end (exclusive)
>>>>>>
------------------------------------------

---- [assembly] tests/assembly-llvm/pauth-basic.rs#aarch64_unknown_linux_pauthtest stdout end ----

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

rust-bors Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 0dbb171 failed: CI. Failed job:

@jhpratt jhpratt closed this Sep 19, 2026
@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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2026
@rust-bors

rust-bors Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

PR #162228, 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 Sep 19, 2026
@jhpratt
jhpratt deleted the rollup-xSHKQf4 branch September 19, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself rollup A PR which is a rollup 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.

9 participants