Skip to content
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

Rollup of 6 pull requests #126297

Closed
wants to merge 15 commits into from
Closed

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Jun 12, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

mgeier and others added 15 commits April 2, 2024 18:54
People keep making fun of this signature for being so gnarly.
Associated type bounds lend it a much simpler scribbling.
ChangeOutputType can also come along for the ride.
Instead of not generating the function at all on big endian (which
makes the CHECK lines fail), instead use to_le() on big endian,
so that we essentially perform a bswap for both endiannesses.
…elix

Spell out other trait diagnostic

I recently saw somebody confused about the diagnostic thinking it was suggesting to add an `as` cast. This change is longer but I think it's clearer
…s, r=compiler-errors

Provide correct parent for nested anon const

Fixes rust-lang#126147

99% of this PR is just comments explaining what the issue is.

`tcx.parent(` and `hir().get_parent_item(` give different results as the hir owner for all the hir of anon consts is the enclosing function. I didn't attempt to change that as being a hir owner requires a `DefId` and long term we want to stop creating anon consts' `DefId`s before hir ty lowering.

So i just opted to change `generics_of` to use `tcx.parent` to get the parent for `AnonConst`'s. I'm not entirely sure about this being what we want, it does seem weird that we have two ways of getting the parent of an `AnonConst` and they both give different results.

Alternatively we could just go ahead and make `const_evaluatable_unchecked` a hard error and stop providing generics to repeat exprs. Then this isn't an issue. (The FCW has been around for almost 4 years now)

r? `@compiler-errors`
…gnature, r=scottmcm

Simplify `[T; N]::try_map` signature

People keep making fun of this signature for being so gnarly.
Associated type bounds admit a much simpler scribbling.

r? `@scottmcm`
…tlarsan68

Add {{target}} substitution to compiletest

In ferrocene we have ui tests testing the cli interface of the compiler, one of which tests the `--target` flag. To be able to run this on all targets we require a way to specify a valid target in the `compile-flags` directive that is target independent, as otherwise we can only run the test against the one target we choose to supply in the flags. See https://github.com/ferrocene/ferrocene/blob/383cbc80f4e85859a4055f121f15dac329908346/tests/ui/ferrocene/compiler-arguments/target/target.rs

We figured the project might be able to make use of this substitution as well in the future.

try-job: dist-x86_64-msvc
…eyouxu

Make issue-122805.rs big endian compatible

Instead of not generating the function at all on big endian (which makes the CHECK lines fail), instead use to_le() on big endian, so that we essentially perform a bswap for both endiannesses.
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Jun 12, 2024
@jhpratt
Copy link
Member Author

jhpratt commented Jun 12, 2024

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Jun 12, 2024

📌 Commit 8732f19 has been approved by jhpratt

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 Jun 12, 2024
@bors
Copy link
Contributor

bors commented Jun 12, 2024

⌛ Testing commit 8732f19 with merge 6a0e442...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 12, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#123374 (DOC: Add FFI example for slice::from_raw_parts())
 - rust-lang#126127 (Spell out other trait diagnostic)
 - rust-lang#126228 (Provide correct parent for nested anon const)
 - rust-lang#126249 (Simplify `[T; N]::try_map` signature)
 - rust-lang#126256 (Add {{target}} substitution to compiletest)
 - rust-lang#126263 (Make issue-122805.rs big endian compatible)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
#16 exporting to docker image format
#16 sending tarball 29.3s done
#16 DONE 41.6s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-17]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
---- [ui] tests/ui/impl-trait/equality.rs stdout ----
diff of stderr:

30    |
31    = help: the trait `Add<impl Foo>` is not implemented for `u32`
32    = help: the following other types implement trait `Add<Rhs>`:
-              <&'a u32 as Add<u32>>
-              <&u32 as Add<&u32>>
-              <u32 as Add<&u32>>
-              <u32 as Add>
+              `&'a u32` implements `Add<u32>`
+              `&u32` implements `Add<&u32>`
+              `u32` implements `Add<&u32>`
+              `u32` implements `Add`
38 error: aborting due to 2 previous errors; 1 warning emitted
39 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/equality/equality.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args impl-trait/equality.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/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/equality.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/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(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/impl-trait/equality" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/equality/auxiliary"
--- stderr -------------------------------
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning]  --> /checkout/tests/ui/impl-trait/equality.rs:1:12
   |
   |
LL | #![feature(specialization)] //~ WARN the feature `specialization` is incomplete
   |
   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
   = help: consider using `min_specialization` instead, which is more stable and complete
   = note: `#[warn(incomplete_features)]` on by default
   = note: `#[warn(incomplete_features)]` on by default

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/impl-trait/equality.rs:15:5
   |
LL | fn two(x: bool) -> impl Foo {
   |                    -------- expected `i32` because of return type
LL |     0_u32
   |     ^^^^^ expected `i32`, found `u32`
   |
   |
help: change the type of the numeric literal from `u32` to `i32`
LL |     0_i32
   |       ~~~

error[E0277]: cannot add `impl Foo` to `u32`
error[E0277]: cannot add `impl Foo` to `u32`
##[error]  --> /checkout/tests/ui/impl-trait/equality.rs:24:11
   |
LL |         n + sum_to(n - 1)
   |           ^ no implementation for `u32 + impl Foo`
   |
   = help: the trait `Add<impl Foo>` is not implemented for `u32`
   = help: the following other types implement trait `Add<Rhs>`:
             `&'a u32` implements `Add<u32>`
             `&u32` implements `Add<&u32>`
             `u32` implements `Add<&u32>`
             `u32` implements `Add`
error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
For more information about an error, try `rustc --explain E0277`.
------------------------------------------


---- [ui] tests/ui/type-alias-impl-trait/constrain_in_projection2.rs#current stdout ----
diff of stderr:

5    |              ^^^ the trait `Trait<Bar>` is not implemented for `Foo`
7    = help: the following other types implement trait `Trait<T>`:
-              <Foo as Trait<()>>
-              <Foo as Trait<()>>
-              <Foo as Trait<u32>>
+              `Foo` implements `Trait<()>`
+              `Foo` implements `Trait<u32>`
11 error: aborting due to 1 previous error
12 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/constrain_in_projection2.current/constrain_in_projection2.current.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type-alias-impl-trait/constrain_in_projection2.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/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/constrain_in_projection2.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/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "current" "--check-cfg" "cfg(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/constrain_in_projection2.current" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/constrain_in_projection2.current/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `Foo: Trait<Bar>` is not satisfied
   |
   |
LL |     let x = <Foo as Trait<Bar>>::Assoc::default();
   |              ^^^ the trait `Trait<Bar>` is not implemented for `Foo`
   = help: the following other types implement trait `Trait<T>`:
             `Foo` implements `Trait<()>`
             `Foo` implements `Trait<u32>`

---
diff of stderr:

8    |     -- return type was inferred to be `()` here
9    |
10    = help: the following other types implement trait `Foo<A>`:
-              <() as Foo<()>>
-              <() as Foo<u32>>
+              `()` implements `Foo<()>`
+              `()` implements `Foo<u32>`
14 error: aborting due to 1 previous error
15 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/nested-tait-inference2.current/nested-tait-inference2.current.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type-alias-impl-trait/nested-tait-inference2.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/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/nested-tait-inference2.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/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "current" "--check-cfg" "cfg(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/nested-tait-inference2.current" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/nested-tait-inference2.current/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `(): Foo<FooX>` is not satisfied
   |
   |
LL | fn foo() -> impl Foo<FooX> {
   |             ^^^^^^^^^^^^^^ the trait `Foo<FooX>` is not implemented for `()`
LL |     //[current]~^ ERROR: the trait bound `(): Foo<FooX>` is not satisfied
   |     -- return type was inferred to be `()` here
   |
   |
   = help: the following other types implement trait `Foo<A>`:
             `()` implements `Foo<()>`
             `()` implements `Foo<u32>`
error: aborting due to 1 previous error

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

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/impl-trait/equality.rs stdout ----
diff of stderr:

30    |
31    = help: the trait `Add<impl Foo>` is not implemented for `u32`
32    = help: the following other types implement trait `Add<Rhs>`:
-              <&'a u32 as Add<u32>>
-              <&u32 as Add<&u32>>
-              <u32 as Add<&u32>>
-              <u32 as Add>
+              `&'a u32` implements `Add<u32>`
+              `&u32` implements `Add<&u32>`
+              `u32` implements `Add<&u32>`
+              `u32` implements `Add`
38 error: aborting due to 2 previous errors; 1 warning emitted
39 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/equality/equality.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args impl-trait/equality.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/impl-trait/equality.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(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/impl-trait/equality" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/equality/auxiliary"
--- stderr -------------------------------
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning]  --> /checkout/tests/ui/impl-trait/equality.rs:1:12
   |
   |
LL | #![feature(specialization)] //~ WARN the feature `specialization` is incomplete
   |
   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
   = help: consider using `min_specialization` instead, which is more stable and complete
   = note: `#[warn(incomplete_features)]` on by default
   = note: `#[warn(incomplete_features)]` on by default

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/impl-trait/equality.rs:15:5
   |
LL | fn two(x: bool) -> impl Foo {
   |                    -------- expected `i32` because of return type
LL |     0_u32
   |     ^^^^^ expected `i32`, found `u32`
   |
   |
help: change the type of the numeric literal from `u32` to `i32`
LL |     0_i32
   |       ~~~

error[E0277]: cannot add `impl Foo` to `u32`
error[E0277]: cannot add `impl Foo` to `u32`
##[error]  --> /checkout/tests/ui/impl-trait/equality.rs:24:11
   |
LL |         n + sum_to(n - 1)
   |           ^ no implementation for `u32 + impl Foo`
   |
   = help: the trait `Add<impl Foo>` is not implemented for `u32`
   = help: the following other types implement trait `Add<Rhs>`:
             `&'a u32` implements `Add<u32>`
             `&u32` implements `Add<&u32>`
             `u32` implements `Add<&u32>`
             `u32` implements `Add`
error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
For more information about an error, try `rustc --explain E0277`.
------------------------------------------


---- [ui] tests/ui/type-alias-impl-trait/constrain_in_projection2.rs#current stdout ----
diff of stderr:

5    |              ^^^ the trait `Trait<Bar>` is not implemented for `Foo`
7    = help: the following other types implement trait `Trait<T>`:
-              <Foo as Trait<()>>
-              <Foo as Trait<()>>
-              <Foo as Trait<u32>>
+              `Foo` implements `Trait<()>`
+              `Foo` implements `Trait<u32>`
11 error: aborting due to 1 previous error
12 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/constrain_in_projection2.current/constrain_in_projection2.current.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type-alias-impl-trait/constrain_in_projection2.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/constrain_in_projection2.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(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/constrain_in_projection2.current" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/constrain_in_projection2.current/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `Foo: Trait<Bar>` is not satisfied
   |
   |
LL |     let x = <Foo as Trait<Bar>>::Assoc::default();
   |              ^^^ the trait `Trait<Bar>` is not implemented for `Foo`
   = help: the following other types implement trait `Trait<T>`:
             `Foo` implements `Trait<()>`
             `Foo` implements `Trait<u32>`

---
diff of stderr:

8    |     -- return type was inferred to be `()` here
9    |
10    = help: the following other types implement trait `Foo<A>`:
-              <() as Foo<()>>
-              <() as Foo<u32>>
+              `()` implements `Foo<()>`
+              `()` implements `Foo<u32>`
14 error: aborting due to 1 previous error
15 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/nested-tait-inference2.current/nested-tait-inference2.current.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type-alias-impl-trait/nested-tait-inference2.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/nested-tait-inference2.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(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/nested-tait-inference2.current" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/nested-tait-inference2.current/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `(): Foo<FooX>` is not satisfied
   |
   |
LL | fn foo() -> impl Foo<FooX> {
   |             ^^^^^^^^^^^^^^ the trait `Foo<FooX>` is not implemented for `()`
LL |     //[current]~^ ERROR: the trait bound `(): Foo<FooX>` is not satisfied
   |     -- return type was inferred to be `()` here
   |
   |
   = help: the following other types implement trait `Foo<A>`:
             `()` implements `Foo<()>`
             `()` implements `Foo<u32>`
error: aborting due to 1 previous error

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

@bors
Copy link
Contributor

bors commented Jun 12, 2024

💔 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 Jun 12, 2024
@jhpratt jhpratt closed this Jun 12, 2024
@jhpratt jhpratt deleted the rollup-ntic8q6 branch June 12, 2024 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants