Skip to content

Conversation

@Zalathar
Copy link
Member

@Zalathar Zalathar commented Dec 10, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

hkBst and others added 30 commits October 10, 2025 10:24
  Previously, when an `impl Trait` captured multiple higher-ranked
  lifetimes from an outer `impl Trait`, the compiler would emit a
  separate error for each captured lifetime. This resulted in verbose
  and confusing diagnostics, especially in edition 2024 where implicit
  captures caused duplicate errors.

  This commit introduces error accumulation that collects all capture
  spans and lifetime declaration spans, then emits a single consolidated
  diagnostic using MultiSpan. The new error shows all captured lifetimes
  with visual indicators and lists all declarations in a single note.
MIPS64 needs to put a padding argument before an aggregate argument when
this argument is in an odd-number position, starting from 0, and has an
alignment of 16 bytes or higher, e.g.
`void foo(int a, max_align_t b);` is the same as
`void foo(int a, long _padding, max_align_t b);`

This fix uses an i32 padding, but it should work just fine because i32 is
aligned like i64 for arguments.
There are major questions remaining about the reentrancy that this
allows. It doesn't have any users on github outside of a single project
that uses it in a panic=abort project to show backtraces. It
can still be emulated through #[alloc_error_handler] or
set_alloc_error_hook depending on if you use the standard library or
not. And finally it makes it harder to do various improvements to the
allocator shim.
Update the tests, add powerpc-*-gnuspe testing, and create a distinct
clobber_abi list for PowerPC SPE targets.

Note, the SPE target does not have vector, vector-scalar, or
floating-point specific registers.
```
error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
  --> $DIR/dyn-trait-type-alias-return-type.rs:4:11
   |
LL | fn f() -> T { loop {} }
   |           ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: this type alias is unsized
  --> $DIR/dyn-trait-type-alias-return-type.rs:1:1
   |
LL | type T = dyn core::fmt::Debug;
   | ^^^^^^
   = note: the return type of a function must have a statically known size
```
Be more faithful that they aren't always available.
document overrides of the default impl of PartialEq::ne

<del>Removes manual impls of PartialEq::ne which are equivalent to the default.</del>

- Cleans up documentation of `PartialEq::ne` and documents overrides of the default impl.
- Uses macros to remove duplication.
…rrors, r=estebank

Deduplicate higher-ranked lifetime capture errors in impl Trait

  Previously, when an `impl Trait` captured multiple higher-ranked
  lifetimes from an outer `impl Trait`, the compiler would emit a
  separate error for each captured lifetime. This resulted in verbose
  and confusing diagnostics, especially in edition 2024 where implicit
  captures caused duplicate errors.

  This commit introduces error accumulation that collects all capture
  spans and lifetime declaration spans, then emits a single consolidated
  diagnostic using MultiSpan. The new error shows all captured lifetimes
  with visual indicators and lists all declarations in a single note.

r? ``@estebank``
Fixes rust-lang#143022
Remove -Zoom=panic

There are major questions remaining about the reentrancy that this allows. It doesn't have any users on github outside of a single project that uses it in a panic=abort project to show backtraces. It can still be emulated through `#[alloc_error_handler]` or `set_alloc_error_hook` depending on if you use the standard library or not. And finally it makes it harder to do various improvements to the allocator shim.

With this PR the sole remaining symbol in the allocator shim that is not effectively emulating weak symbols is the symbol that prevents skipping the allocator shim on stable even when it would otherwise be empty because libstd + `#[global_allocator]` is used.

Closes rust-lang#43596
Fixes rust-lang#126683
…rgs, r=workingjubilee

callconv: fix mips64 aggregate argument passing for C FFI

MIPS64 needs to put a padding argument before an aggregate argument when
this argument is in an odd-number position, starting from 0, and has an
alignment of 16 bytes or higher, e.g.
`void foo(int a, max_align_t b);` is the same as
`void foo(int a, long _padding, max_align_t b);`
 Correctly provide suggestions when encountering `async fn` with a `dyn Trait` return type

Point at return type of `async fn`s instead of their def `Span`.

Correctly provide suggestions when encountering `async fn` with a `dyn Trait` return type.

Correctly address `type Alias = dyn Trait` when `fn foo() -> Alias { .. }`.

Fix rust-lang#147894.
…Mark-Simulacrum

tidy: Detect outdated workspaces in workspace list

Detects the case in rust-lang#149415 (will pass CI once that lands).
…bilee

Use `let`...`else` instead of `match foo { ... _ => return };` and `if let ... else return` in std

Split off rust-lang#148837.
…r=JonathanBrouwer,Kivooeo

Make typo in field and name suggestions verbose

Part of rust-lang#141973.
Add a regression test for issue 145748

Seems to be fixed while allowing non-defining usages of opaques in next-solver.

Closes rust-lang#145748
compiletest: tidy up `adb_path`/`adb_test_dir` handling

Be more faithful that they aren't always available.

try-job: arm-android
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-windows Operating system: Windows 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-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) rollup A PR which is a rollup labels Dec 10, 2025
@Zalathar
Copy link
Member Author

Rollup of everything.

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Dec 10, 2025

📌 Commit 5ae893d 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 Dec 10, 2025
@Zalathar
Copy link
Member Author

@bors try jobs=x86_64-gnu-llvm-21-3

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 10, 2025
Rollup of 13 pull requests

try-job: x86_64-gnu-llvm-21-3
@rust-log-analyzer
Copy link
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)
---- [ui] tests/ui/type-alias-impl-trait/self-referential-2.rs#current stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/self-referential-2.current/self-referential-2.current.stderr`
diff of stderr:

9 help: the trait `PartialEq<Foo>` is not implemented for `i32`
10       but trait `PartialEq<i32>` is implemented for it
11   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
13 
14 error: aborting due to 1 previous error
15 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/self-referential-2.rs`

error in revision `current`: 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/type-alias-impl-trait/self-referential-2.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" "--cfg" "current" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/type-alias-impl-trait/self-referential-2.current" "-A" "unused" "-W" "unused_attributes" "-A" "internal_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[E0277]: can't compare `i32` with `Foo`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-2.rs:11:13
   |
LL | fn bar() -> Bar {
   |             ^^^ no implementation for `i32 == Foo`
LL |     42_i32 //[current]~^ ERROR can't compare `i32` with `Foo`
   |     ------ return type was inferred to be `i32` here
   |
help: the trait `PartialEq<Foo>` is not implemented for `i32`
      but trait `PartialEq<i32>` is implemented for it
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------

---- [ui] tests/ui/type-alias-impl-trait/self-referential-2.rs#current stdout end ----
---- [ui] tests/ui/type-alias-impl-trait/self-referential-3.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/self-referential-3/self-referential-3.stderr`
diff of stderr:

10    = help: the trait `PartialEq<Bar<'a, 'b>>` is not implemented for `&i32`
11 help: the trait `PartialEq` is implemented for `i32`
12   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
14 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/self-referential-3.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/type-alias-impl-trait/self-referential-3.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/type-alias-impl-trait/self-referential-3" "-A" "unused" "-W" "unused_attributes" "-A" "internal_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[E0277]: can't compare `&i32` with `Bar<'a, 'b>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-3.rs:6:31
   |
LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Bar<'a, 'b>`
LL |     //~^ ERROR can't compare `&i32` with `Bar<'a, 'b>`
LL |     i
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Bar<'a, 'b>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------

---- [ui] tests/ui/type-alias-impl-trait/self-referential-3.rs stdout end ----
---- [ui] tests/ui/type-alias-impl-trait/self-referential-4.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/self-referential-4/self-referential-4.stderr`
diff of stderr:

9    = help: the trait `PartialEq<Bar<'b, 'static>>` is not implemented for `&i32`
10 help: the trait `PartialEq` is implemented for `i32`
11   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
13 
14 error[E0277]: can't compare `&i32` with `Foo<'static, 'b>`
15   --> $DIR/self-referential-4.rs:13:31

22    = help: the trait `PartialEq<Foo<'static, 'b>>` is not implemented for `&i32`
23 help: the trait `PartialEq` is implemented for `i32`
24   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
26 
27 error[E0277]: can't compare `&i32` with `Moo<'static, 'a>`
28   --> $DIR/self-referential-4.rs:20:31

35    = help: the trait `PartialEq<Moo<'static, 'a>>` is not implemented for `&i32`
36 help: the trait `PartialEq` is implemented for `i32`
37   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
39 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/self-referential-4.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/type-alias-impl-trait/self-referential-4.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/type-alias-impl-trait/self-referential-4" "-A" "unused" "-W" "unused_attributes" "-A" "internal_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[E0277]: can't compare `&i32` with `Bar<'b, 'static>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-4.rs:6:31
   |
LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Bar<'b, 'static>`
LL |     i //~^ ERROR can't compare `&i32` with `Bar<'b, 'static>`
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Bar<'b, 'static>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: can't compare `&i32` with `Foo<'static, 'b>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-4.rs:13:31
   |
LL | fn foo<'a, 'b>(i: &'a i32) -> Foo<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Foo<'static, 'b>`
LL |     i //~^ ERROR can't compare `&i32` with `Foo<'static, 'b>`
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Foo<'static, 'b>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: can't compare `&i32` with `Moo<'static, 'a>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-4.rs:20:31
   |
LL | fn moo<'a, 'b>(i: &'a i32) -> Moo<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Moo<'static, 'a>`
LL |     i //~^ ERROR can't compare `&i32` with `Moo<'static, 'a>`
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Moo<'static, 'a>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors
---
---- [ui] tests/ui/type-alias-impl-trait/self-referential.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/self-referential/self-referential.stderr`
diff of stderr:

10    = help: the trait `PartialEq<Bar<'b, 'a>>` is not implemented for `&i32`
11 help: the trait `PartialEq` is implemented for `i32`
12   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
14 
15 error[E0277]: can't compare `&i32` with `(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)`
16   --> $DIR/self-referential.rs:14:31

24    = help: the trait `PartialEq<(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)>` is not implemented for `&i32`
25 help: the trait `PartialEq` is implemented for `i32`
26   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
28 
29 error[E0277]: can't compare `&i32` with `(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)`
30   --> $DIR/self-referential.rs:22:31

38    = help: the trait `PartialEq<(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)>` is not implemented for `&i32`
39 help: the trait `PartialEq` is implemented for `i32`
40   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
42 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/self-referential.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/type-alias-impl-trait/self-referential.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/type-alias-impl-trait/self-referential" "-A" "unused" "-W" "unused_attributes" "-A" "internal_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[E0277]: can't compare `&i32` with `Bar<'b, 'a>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential.rs:6:31
   |
LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Bar<'b, 'a>`
LL |     //~^ ERROR can't compare `&i32` with `Bar<'b, 'a>`
LL |     i
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Bar<'b, 'a>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: can't compare `&i32` with `(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential.rs:14:31
   |
LL | fn foo<'a, 'b>(i: &'a i32) -> Foo<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == (i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)`
LL |     //~^ ERROR can't compare `&i32` with `(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)`
LL |     (42, i)
   |     ------- return type was inferred to be `(i32, &i32)` here
   |
   = help: the trait `PartialEq<(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: can't compare `&i32` with `(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential.rs:22:31
   |
LL | fn moo<'a, 'b>(i: &'a i32) -> Moo<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == (i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)`
LL |     //~^ ERROR can't compare `&i32` with `(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)`
LL |     (42, i)
   |     ------- return type was inferred to be `(i32, &i32)` here
   |
   = help: the trait `PartialEq<(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

@rust-bors
Copy link

rust-bors bot commented Dec 10, 2025

💔 Test for 1c839c0 failed: CI. Failed jobs:

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/type-alias-impl-trait/self-referential-2.rs#current stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/type-alias-impl-trait/self-referential-2.current/self-referential-2.current.stderr`
diff of stderr:

9 help: the trait `PartialEq<Foo>` is not implemented for `i32`
10       but trait `PartialEq<i32>` is implemented for it
11   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
13 
14 error: aborting due to 1 previous error
15 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/self-referential-2.rs`

error in revision `current`: 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/type-alias-impl-trait/self-referential-2.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" "--cfg" "current" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/type-alias-impl-trait/self-referential-2.current" "-A" "unused" "-W" "unused_attributes" "-A" "internal_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[E0277]: can't compare `i32` with `Foo`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-2.rs:11:13
   |
LL | fn bar() -> Bar {
   |             ^^^ no implementation for `i32 == Foo`
LL |     42_i32 //[current]~^ ERROR can't compare `i32` with `Foo`
   |     ------ return type was inferred to be `i32` here
   |
help: the trait `PartialEq<Foo>` is not implemented for `i32`
      but trait `PartialEq<i32>` is implemented for it
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------

---- [ui] tests/ui/type-alias-impl-trait/self-referential-2.rs#current stdout end ----
---- [ui] tests/ui/type-alias-impl-trait/self-referential-3.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/type-alias-impl-trait/self-referential-3/self-referential-3.stderr`
diff of stderr:

10    = help: the trait `PartialEq<Bar<'a, 'b>>` is not implemented for `&i32`
11 help: the trait `PartialEq` is implemented for `i32`
12   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
14 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/self-referential-3.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/type-alias-impl-trait/self-referential-3.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/type-alias-impl-trait/self-referential-3" "-A" "unused" "-W" "unused_attributes" "-A" "internal_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[E0277]: can't compare `&i32` with `Bar<'a, 'b>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-3.rs:6:31
   |
LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Bar<'a, 'b>`
LL |     //~^ ERROR can't compare `&i32` with `Bar<'a, 'b>`
LL |     i
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Bar<'a, 'b>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------

---- [ui] tests/ui/type-alias-impl-trait/self-referential-3.rs stdout end ----
---- [ui] tests/ui/type-alias-impl-trait/self-referential-4.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/type-alias-impl-trait/self-referential-4/self-referential-4.stderr`
diff of stderr:

9    = help: the trait `PartialEq<Bar<'b, 'static>>` is not implemented for `&i32`
10 help: the trait `PartialEq` is implemented for `i32`
11   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
13 
14 error[E0277]: can't compare `&i32` with `Foo<'static, 'b>`
15   --> $DIR/self-referential-4.rs:13:31

22    = help: the trait `PartialEq<Foo<'static, 'b>>` is not implemented for `&i32`
23 help: the trait `PartialEq` is implemented for `i32`
24   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
26 
27 error[E0277]: can't compare `&i32` with `Moo<'static, 'a>`
28   --> $DIR/self-referential-4.rs:20:31

35    = help: the trait `PartialEq<Moo<'static, 'a>>` is not implemented for `&i32`
36 help: the trait `PartialEq` is implemented for `i32`
37   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
39 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/self-referential-4.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/type-alias-impl-trait/self-referential-4.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/type-alias-impl-trait/self-referential-4" "-A" "unused" "-W" "unused_attributes" "-A" "internal_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[E0277]: can't compare `&i32` with `Bar<'b, 'static>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-4.rs:6:31
   |
LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Bar<'b, 'static>`
LL |     i //~^ ERROR can't compare `&i32` with `Bar<'b, 'static>`
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Bar<'b, 'static>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: can't compare `&i32` with `Foo<'static, 'b>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-4.rs:13:31
   |
LL | fn foo<'a, 'b>(i: &'a i32) -> Foo<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Foo<'static, 'b>`
LL |     i //~^ ERROR can't compare `&i32` with `Foo<'static, 'b>`
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Foo<'static, 'b>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: can't compare `&i32` with `Moo<'static, 'a>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential-4.rs:20:31
   |
LL | fn moo<'a, 'b>(i: &'a i32) -> Moo<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Moo<'static, 'a>`
LL |     i //~^ ERROR can't compare `&i32` with `Moo<'static, 'a>`
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Moo<'static, 'a>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors
---
---- [ui] tests/ui/type-alias-impl-trait/self-referential.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/type-alias-impl-trait/self-referential/self-referential.stderr`
diff of stderr:

10    = help: the trait `PartialEq<Bar<'b, 'a>>` is not implemented for `&i32`
11 help: the trait `PartialEq` is implemented for `i32`
12   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
14 
15 error[E0277]: can't compare `&i32` with `(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)`
16   --> $DIR/self-referential.rs:14:31

24    = help: the trait `PartialEq<(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)>` is not implemented for `&i32`
25 help: the trait `PartialEq` is implemented for `i32`
26   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
28 
29 error[E0277]: can't compare `&i32` with `(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)`
30   --> $DIR/self-referential.rs:22:31

38    = help: the trait `PartialEq<(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)>` is not implemented for `&i32`
39 help: the trait `PartialEq` is implemented for `i32`
40   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-    = note: this error originates in the macro `partial_eq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
42 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/self-referential.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/type-alias-impl-trait/self-referential.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/type-alias-impl-trait/self-referential" "-A" "unused" "-W" "unused_attributes" "-A" "internal_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[E0277]: can't compare `&i32` with `Bar<'b, 'a>`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential.rs:6:31
   |
LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == Bar<'b, 'a>`
LL |     //~^ ERROR can't compare `&i32` with `Bar<'b, 'a>`
LL |     i
   |     - return type was inferred to be `&i32` here
   |
   = help: the trait `PartialEq<Bar<'b, 'a>>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: can't compare `&i32` with `(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential.rs:14:31
   |
LL | fn foo<'a, 'b>(i: &'a i32) -> Foo<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == (i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)`
LL |     //~^ ERROR can't compare `&i32` with `(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)`
LL |     (42, i)
   |     ------- return type was inferred to be `(i32, &i32)` here
   |
   = help: the trait `PartialEq<(i32, Foo<'a, 'b>::{opaque#0}<'a, 'b>)>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: can't compare `&i32` with `(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/self-referential.rs:22:31
   |
LL | fn moo<'a, 'b>(i: &'a i32) -> Moo<'a, 'b> {
   |                               ^^^^^^^^^^^ no implementation for `&i32 == (i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)`
LL |     //~^ ERROR can't compare `&i32` with `(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)`
LL |     (42, i)
   |     ------- return type was inferred to be `(i32, &i32)` here
   |
   = help: the trait `PartialEq<(i32, Moo<'b, 'a>::{opaque#0}<'b, 'a>)>` is not implemented for `&i32`
help: the trait `PartialEq` is implemented for `i32`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:1890:4
   = note: this error originates in the macro `impl_partial_eq_for_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.