Skip to content

Rollup of 18 pull requests#158386

Closed
JonathanBrouwer wants to merge 55 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-MfzMs1m
Closed

Rollup of 18 pull requests#158386
JonathanBrouwer wants to merge 55 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-MfzMs1m

Conversation

@JonathanBrouwer

@JonathanBrouwer JonathanBrouwer commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

sandersaares and others added 30 commits May 11, 2026 15:37
…impl Send + dyn Trait

Add a regression test covering the case where a type uses
PhantomData<*mut ()> to opt out of Sync, restores Send via an unsafe
impl, and is then captured across an .await point with a trait object
type parameter (Box<dyn Trait>).

The compiler currently erases lifetimes in MIR coroutine witnesses,
losing the 'static bound needed to apply the unsafe impl Send. The
test verifies this is fixed by -Zhigher-ranked-assumptions and
documents the PhantomData<Cell<()>> workaround as a comparison. See
the PR description for links to the relevant issues.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There will still be one for things that aren't just scalars or scalar pairs.
When emitting a `memcpy` for a scalable vector, the size computed by
rustc (`num_vectors * element_count * element_ty`), since
rust-lang#157915, needs to be multiplied by `vscale`.
Currently, rustc can emit a FatalError diagnostic during parsing of
literals and tokenstreams. These are handled under the hood as a panic,
which means that proc-macro code needed to catch_unwind if it wanted to
fallibly parse some code. These still emit diagnostics, so in practice
this isn't a full fix, but it at least makes the interface on the macro
side a bit more uniform.

This is primarily motivated by wasm proc macros which can't use
catch_unwind and so this lets the test's output be the same with and
without them.
And remove redundant const fn
While it would be reasonable to expect the Windows linker to handle
linker args in the .drectve section identical to cli arguments, as it
turns out exporting weak symbols only works when the /EXPORT is in the
.drectve section, not when it is a linker argument or when a .DEF file
is used.
- const, async, and unsafe functions
- const generics, complex types, and where clauses (including impl Tuple)
…ity.md

The sentence in `src/doc/unstable-book/src/compiler-flags/default-visibility.md`
contained the misspelling "earier" where "earlier" was meant.

```
-shared objects earier in the load order.
+shared objects earlier in the load order.
```

This is detected by the project's typos configuration; `./x test tidy
--extra-checks=spellcheck` would flag it on the next run.

Signed-off-by: Dodothereal <129273127+Dodothereal@users.noreply.github.com>
The new normalization regex is taken from many existing test cases,
see: https://github.com/search?q=repo%3Arust-lang%2Frust+%2Fthread+%27rustc%27%5C.%5C*panicked%2F&type=code

which includes files such as `tests/ui/treat-err-as-bug/span_delayed_bug.rs`
or `tests/ui/treat-err-as-bug/err.rs`
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 25, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature F-autodiff `#![feature(autodiff)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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-rust-analyzer Relevant to the rust-analyzer 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 25, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

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

@rust-bors

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1df1f5e 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 Jun 25, 2026
@rust-bors

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 1df1f5e with merge 18b289b

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/28147864096

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


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

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  SKIP_SUBMODULES: src/gcc
  IMAGE: tidy
##[endgroup]
    Updating crates.io index
error: failed to get `cookie` as a dependency of package `cookie_store v0.21.1`
    ... which satisfies dependency `cookie_store = "^0.21.1"` of package `ureq v3.0.8`
    ... which satisfies dependency `ureq = "^3"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `cookie`

Caused by:
  unable to update registry `crates-io`

Caused by:
  download of co/ok/cookie failed

Caused by:
  curl failed

Caused by:

@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)
test [ui] tests/ui/linkage-attr/raw-dylib/windows/raw-dylib-windows-only.rs#elf ... ok
test [ui] tests/ui/linkage-attr/unstable-flavor.rs#bpf ... ok
test [ui] tests/ui/linking/cdylib-no-mangle.rs ... ignored, only executed when the target vendor is Apple
test [ui] tests/ui/linkage-attr/unstable-flavor.rs#llbc ... ok
test [ui] tests/ui/linking/dll-weak-definition.rs#link_exe ... ignored, only executed when the target environment is msvc
test [ui] tests/ui/linking/dll-weak-definition.rs#lld ... ignored, ignored on targets without Rust's LLD
test [ui] tests/ui/linking/crate-type-invalid-flag-error.rs ... ok
test [ui] tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs ... ok
test [ui] tests/ui/linkage-attr/unreferenced-used-static-issue-127052.rs ... ok
test [ui] tests/ui/linking/ld64-cross-compilation.rs ... ignored, only executed when the target is x86_64-apple-darwin
test [ui] tests/ui/linking/link-self-contained-consistency.rs#many ... ok
---
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/supertrait-shadowing/assoc-type-predicates/assoc-type-predicates.stderr`
diff of stderr:

6    |
7    = note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
8    = note: Binder { value: TraitPredicate(<T as A>, polarity:Positive), bound_vars: [] }
-    = note: Binder { value: ProjectionPredicate(AliasTerm { args: [T/#0], kind: ProjectionTy { def_id: DefId(0:4 ~ assoc_type_predicates[HASH]::A::Assoc) }, .. }, Term::Ty(i8)), bound_vars: [] }
+    = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:4 ~ assoc_type_predicates[HASH]::A::Assoc) }, args: [T/#0], .. }, Term::Ty(i8)), bound_vars: [] }
10 
11 error: rustc_dump_predicates
12   --> $DIR/assoc-type-predicates.rs:32:1

16    |
17    = note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
18    = note: Binder { value: TraitPredicate(<T as B>, polarity:Positive), bound_vars: [] }
-    = note: Binder { value: ProjectionPredicate(AliasTerm { args: [T/#0], kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[HASH]::B::Assoc) }, .. }, Term::Ty(i16)), bound_vars: [] }
+    = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[HASH]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] }
20 
21 error: rustc_dump_predicates
22   --> $DIR/assoc-type-predicates.rs:39:1

26    |
27    = note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
28    = note: Binder { value: TraitPredicate(<T as C>, polarity:Positive), bound_vars: [] }
-    = note: Binder { value: ProjectionPredicate(AliasTerm { args: [T/#0], kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[HASH]::B::Assoc) }, .. }, Term::Ty(i16)), bound_vars: [] }
+    = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[HASH]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] }
30 
31 error: aborting due to 3 previous errors
32 

Note: some mismatched output was normalized before being compared
-    = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:4 ~ assoc_type_predicates[78f4]::A::Assoc) }, args: [T/#0], .. }, Term::Ty(i8)), bound_vars: [] }
-    = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[78f4]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] }
-    = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[78f4]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] }
+    = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:4 ~ assoc_type_predicates[HASH]::A::Assoc) }, args: [T/#0], .. }, Term::Ty(i8)), bound_vars: [] }
+    = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[HASH]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] }
+    = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[HASH]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] }


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args supertrait-shadowing/assoc-type-predicates.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/supertrait-shadowing/assoc-type-predicates.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/supertrait-shadowing/assoc-type-predicates" "-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: rustc_dump_predicates
##[error]  --> /checkout/tests/ui/supertrait-shadowing/assoc-type-predicates.rs:25:1
   |
LL | fn a_bound<T: A<Assoc = i8>>() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
   = note: Binder { value: TraitPredicate(<T as A>, polarity:Positive), bound_vars: [] }
   = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:4 ~ assoc_type_predicates[78f4]::A::Assoc) }, args: [T/#0], .. }, Term::Ty(i8)), bound_vars: [] }

error: rustc_dump_predicates
##[error]  --> /checkout/tests/ui/supertrait-shadowing/assoc-type-predicates.rs:32:1
   |
LL | fn b_bound<T: B<Assoc = i16>>() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
   = note: Binder { value: TraitPredicate(<T as B>, polarity:Positive), bound_vars: [] }
   = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[78f4]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] }

error: rustc_dump_predicates
##[error]  --> /checkout/tests/ui/supertrait-shadowing/assoc-type-predicates.rs:39:1
   |
LL | fn c_bound<T: C<Assoc = i16>>() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
   = note: Binder { value: TraitPredicate(<T as C>, polarity:Positive), bound_vars: [] }
   = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_predicates[78f4]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] }

error: aborting due to 3 previous errors
------------------------------------------

---- [ui] tests/ui/supertrait-shadowing/assoc-type-predicates.rs stdout end ----

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

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

PR #152225, 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 Jun 25, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature F-autodiff `#![feature(autodiff)]` rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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-rust-analyzer Relevant to the rust-analyzer 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. 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.