Skip to content

Rollup of 22 pull requests #145418

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 66 commits into from
Closed

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Aug 15, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

workingjubilee and others added 30 commits June 27, 2025 11:04
Like its signed counterpart, this function does not panic. Also, fix the
examples to document how it returns Some/None.
It used to be necessary on Apple platforms to ship with the App Store,
but XCode 15 has stopped embedding LLVM bitcode and the App Store no
longer accepts apps with bitcode embedded.
compiler & tools dependencies:
     Locking 18 packages to latest compatible versions
    Updating anstream v0.6.19 -> v0.6.20
    Updating anstyle-query v1.1.3 -> v1.1.4
    Updating anstyle-svg v0.1.9 -> v0.1.10
    Updating anstyle-wincon v3.0.9 -> v3.0.10
    Updating camino v1.1.10 -> v1.1.11
    Updating clap v4.5.42 -> v4.5.43
    Updating clap_builder v4.5.42 -> v4.5.43
    Updating cxx v1.0.161 -> v1.0.166
    Updating cxx-build v1.0.161 -> v1.0.166
    Updating cxxbridge-cmd v1.0.161 -> v1.0.166
    Updating cxxbridge-flags v1.0.161 -> v1.0.166
    Updating cxxbridge-macro v1.0.161 -> v1.0.166
    Updating derive-where v1.5.0 -> v1.6.0
    Updating hashbrown v0.15.4 -> v0.15.5
    Updating indenter v0.3.3 -> v0.3.4
    Updating rustversion v1.0.21 -> v1.0.22
    Updating scratch v1.0.8 -> v1.0.9
    Updating zerovec v0.11.2 -> v0.11.4
note: pass `--verbose` to see 36 unchanged dependencies behind latest

library dependencies:
     Locking 1 package to latest compatible version
    Updating hashbrown v0.15.4 -> v0.15.5
note: pass `--verbose` to see 2 unchanged dependencies behind latest

rustbook dependencies:
     Locking 10 packages to latest compatible versions
    Updating anstream v0.6.19 -> v0.6.20
    Updating anstyle-query v1.1.3 -> v1.1.4
    Updating anstyle-wincon v3.0.9 -> v3.0.10
    Updating cc v1.2.31 -> v1.2.32
    Updating clap v4.5.42 -> v4.5.43
    Updating clap_builder v4.5.42 -> v4.5.43
    Updating clap_complete v4.5.55 -> v4.5.56
    Updating hashbrown v0.15.4 -> v0.15.5
    Updating rustversion v1.0.21 -> v1.0.22
    Updating zerovec v0.11.2 -> v0.11.4
…length limit

When doing lto, rustc generates filenames that are concatenating many information.

In the case of this testcase, it is concatenating crate name and rust file name, plus some hash, and the extension.
In some other cases it will concatenate even more information reducing the maximum effective crate name to about 110 chars on linux filesystems where
filename max length is 255

This commit is ensuring that the temporary file names are limited in size, while still reasonabily ensuring the unicity (with hashing of the stripped part)
LLVM removed the size parameter from the lifetime format.
Tolerate not having that size parameter.
In the desugaring of `assert!`, we now expand to a `match` expression
instead of `if !cond {..}`.

The span of incorrect conditions will point only at the expression, and not
the whole `assert!` invocation.

```
error[E0308]: mismatched types
  --> $DIR/issue-14091.rs:2:13
   |
LL |     assert!(1,1);
   |             ^ expected `bool`, found integer
```

We no longer mention the expression needing to implement the `Not` trait.

```
error[E0308]: mismatched types
  --> $DIR/issue-14091-2.rs:15:13
   |
LL |     assert!(x, x);
   |             ^ expected `bool`, found `BytePos`
```

`assert!(val)` now desugars to:

```rust
match val {
    true => {},
    _ => $crate::panic::panic_2021!(),
}
```

Fix rust-lang#122159.

We make some minor changes to some diagnostics to avoid span overlap on
type mismatch or inverted "expected"/"found" on type errors.

We remove some unnecessary parens from core, alloc and miri.

address review comments
This seem to have been overlooked in <rust-lang#138162>
@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-search Area: Rustdoc's search feature F-autodiff `#![feature(autodiff)]` F-explicit_tail_calls `#![feature(explicit_tail_calls)]` 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. 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 15, 2025
@Zalathar
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 15, 2025

📌 Commit 17586c3 has been approved by Zalathar

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 15, 2025
@Zalathar
Copy link
Contributor Author

Pre-running a small selection of weird jobs.

@bors try jobs=test-various,dist-ohos-x86_64,x86_64-gnu-nopt

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 15, 2025
Rollup of 22 pull requests

try-job: test-various
try-job: dist-ohos-x86_64
try-job: x86_64-gnu-nopt
bors added a commit that referenced this pull request Aug 15, 2025
Rollup of 22 pull requests

Successful merges:

 - #118087 (Add Ref/RefMut try_map method)
 - #122661 (Change the desugaring of `assert!` for better error output)
 - #140740 (Add `-Zindirect-branch-cs-prefix`)
 - #142640 (Implement autodiff using intrinsics)
 - #143075 (compiler: Allow `extern "interrupt" fn() -> !`)
 - #144865 (Fix tail calls to `#[track_caller]` functions)
 - #144944 (E0793: Clarify that it applies to unions as well)
 - #144947 (Fix description of unsigned `checked_exact_div`)
 - #145004 (Couple of minor cleanups)
 - #145005 (strip prefix of temporary file names when it exceeds filesystem name length limit)
 - #145012 (Tail call diagnostics to include lifetime info)
 - #145065 (resolve: Introduce `RibKind::Block`)
 - #145120 (llvm: Accept new LLVM lifetime format)
 - #145189 (Weekly `cargo update`)
 - #145235 (Minor `[const]` tweaks)
 - #145275 (fix(compiler/rustc_codegen_llvm): apply `target-cpu` attribute)
 - #145322 (Resolve the prelude import in `build_reduced_graph`)
 - #145331 (Make std use the edition 2024 prelude)
 - #145369 (Do not ICE on private type in field of unresolved struct)
 - #145378 (Add `FnContext` in parser for diagnostic)
 - #145389 ([rustdoc] Revert "rustdoc search: prefer stable items in search results")
 - #145392 (coverage: Remove intermediate data structures from mapping creation)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Aug 15, 2025

⌛ Testing commit 17586c3 with merge f4b87c1...

@rust-bors
Copy link

rust-bors bot commented Aug 15, 2025

☀️ Try build successful (CI)
Build commit: 091764f (091764f14f64f34aa61e5d548c2b4cf02ec812bb, parent: 3507a749b365aae4eefa96ab700a9315d3280ee7)

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-apple-1 failed! Check out the build log: (web) (plain enhanced) (plain)

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

---- [assembly] tests/assembly-llvm/x86_64-indirect-branch-cs-prefix.rs#set stdout ----

error in revision `set`: verification with 'FileCheck' failed
status: exit status: 1
command: "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin/FileCheck" "--input-file" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/assembly-llvm/x86_64-indirect-branch-cs-prefix.set/x86_64-indirect-branch-cs-prefix.s" "/Users/runner/work/rust/rust/tests/assembly-llvm/x86_64-indirect-branch-cs-prefix.rs" "--check-prefix=CHECK" "--check-prefix" "set" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/Users/runner/work/rust/rust/tests/assembly-llvm/x86_64-indirect-branch-cs-prefix.rs:18:15: error: set-NEXT: expected string not found in input
 // set-NEXT: callq {{__x86_indirect_thunk.*}}
              ^
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/assembly-llvm/x86_64-indirect-branch-cs-prefix.set/x86_64-indirect-branch-cs-prefix.s:17:4: note: scanning from here
 cs
   ^
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/assembly-llvm/x86_64-indirect-branch-cs-prefix.set/x86_64-indirect-branch-cs-prefix.s:18:2: note: possible intended match here
 callq ___x86_indirect_thunk_r11
 ^

Input file: /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/assembly-llvm/x86_64-indirect-branch-cs-prefix.set/x86_64-indirect-branch-cs-prefix.s
Check file: /Users/runner/work/rust/rust/tests/assembly-llvm/x86_64-indirect-branch-cs-prefix.rs

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

Input was:
<<<<<<
           1:  .macosx_version_min 10, 12 
           2:  .section __TEXT,__text,regular,pure_instructions 
           3:  .globl _foo 
           4:  .p2align 4 
           5: _foo: 
           6:  .cfi_startproc 
           7:  pushq %rbp 
           8:  .cfi_def_cfa_offset 16 
           9:  .cfi_offset %rbp, -16 
          10:  movq %rsp, %rbp 
          11:  .cfi_def_cfa_register %rbp 
          12:  pushq %rbx 
          13:  pushq %rax 
          14:  .cfi_offset %rbx, -24 
          15:  movq %rdi, %rbx 
          16:  movq %rdi, %r11 
          17:  cs 
next:18'0        X error: no match found
          18:  callq ___x86_indirect_thunk_r11 
next:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:18'1      ?                                possible intended match
          19:  movq %rbx, %r11 
next:18'0     ~~~~~~~~~~~~~~~~~
          20:  addq $8, %rsp 
next:18'0     ~~~~~~~~~~~~~~~
          21:  popq %rbx 
next:18'0     ~~~~~~~~~~~
          22:  popq %rbp 
next:18'0     ~~~~~~~~~~~
          23:  cs 
next:18'0     ~~~~
          24:  jmp ___x86_indirect_thunk_r11 
next:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          25:  .cfi_endproc 
next:18'0     ~~~~~~~~~~~~~~
          26:  
next:18'0     ~
          27: .subsections_via_symbols 
next:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>
------------------------------------------


---- [assembly] tests/assembly-llvm/x86_64-indirect-branch-cs-prefix.rs#unset stdout ----

error in revision `unset`: verification with 'FileCheck' failed
status: exit status: 1
command: "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin/FileCheck" "--input-file" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/assembly-llvm/x86_64-indirect-branch-cs-prefix.unset/x86_64-indirect-branch-cs-prefix.s" "/Users/runner/work/rust/rust/tests/assembly-llvm/x86_64-indirect-branch-cs-prefix.rs" "--check-prefix=CHECK" "--check-prefix" "unset" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/Users/runner/work/rust/rust/tests/assembly-llvm/x86_64-indirect-branch-cs-prefix.rs:16:12: error: unset: expected string not found in input
 // unset: callq {{__x86_indirect_thunk.*}}
           ^
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/assembly-llvm/x86_64-indirect-branch-cs-prefix.unset/x86_64-indirect-branch-cs-prefix.s:5:6: note: scanning from here
_foo:
     ^
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/assembly-llvm/x86_64-indirect-branch-cs-prefix.unset/x86_64-indirect-branch-cs-prefix.s:17:2: note: possible intended match here
 callq ___x86_indirect_thunk_r11
 ^

Input file: /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/assembly-llvm/x86_64-indirect-branch-cs-prefix.unset/x86_64-indirect-branch-cs-prefix.s
Check file: /Users/runner/work/rust/rust/tests/assembly-llvm/x86_64-indirect-branch-cs-prefix.rs

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

Input was:
<<<<<<
            1:  .macosx_version_min 10, 12 
            2:  .section __TEXT,__text,regular,pure_instructions 
            3:  .globl _foo 
            4:  .p2align 4 
            5: _foo: 
check:16'0          X error: no match found
            6:  .cfi_startproc 
check:16'0     ~~~~~~~~~~~~~~~~
            7:  pushq %rbp 
check:16'0     ~~~~~~~~~~~~
            8:  .cfi_def_cfa_offset 16 
check:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~
            9:  .cfi_offset %rbp, -16 
check:16'0     ~~~~~~~~~~~~~~~~~~~~~~~
           10:  movq %rsp, %rbp 
check:16'0     ~~~~~~~~~~~~~~~~~
           11:  .cfi_def_cfa_register %rbp 
check:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           12:  pushq %rbx 
check:16'0     ~~~~~~~~~~~~
           13:  pushq %rax 
check:16'0     ~~~~~~~~~~~~
           14:  .cfi_offset %rbx, -24 
check:16'0     ~~~~~~~~~~~~~~~~~~~~~~~
           15:  movq %rdi, %rbx 
check:16'0     ~~~~~~~~~~~~~~~~~
           16:  movq %rdi, %r11 
check:16'0     ~~~~~~~~~~~~~~~~~
           17:  callq ___x86_indirect_thunk_r11 
check:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:16'1      ?                                possible intended match
           18:  movq %rbx, %r11 
check:16'0     ~~~~~~~~~~~~~~~~~
           19:  addq $8, %rsp 
check:16'0     ~~~~~~~~~~~~~~~
           20:  popq %rbx 
check:16'0     ~~~~~~~~~~~
           21:  popq %rbp 
check:16'0     ~~~~~~~~~~~
           22:  jmp ___x86_indirect_thunk_r11 
check:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           23:  .cfi_endproc 
check:16'0     ~~~~~~~~~~~~~~
           24:  
check:16'0     ~
           25: .subsections_via_symbols 
check:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>

@bors
Copy link
Collaborator

bors commented Aug 15, 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 15, 2025
@Zalathar Zalathar closed this Aug 15, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 15, 2025
@Zalathar Zalathar deleted the rollup-qgoixs3 branch August 15, 2025 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-search Area: Rustdoc's search feature F-autodiff `#![feature(autodiff)]` F-explicit_tail_calls `#![feature(explicit_tail_calls)]` 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. 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.