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 9 pull requests #135317

Closed
wants to merge 23 commits into from

Conversation

workingjubilee
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

hkBst and others added 23 commits December 22, 2024 18:29
I've removed the cryptic message about not being able to call `&mut self` methods while retaining a shared borrow of the iterator, such as `as_slice` produces. This is just normal borrowing rules and does not seem especially relevant here. I can whip up a replacement if someone thinks it has value.
The comment says that the expression involves no function call, but
that was only true for the example above, the example here _does_
contain a function call.
previously field ordering was using the same seed for all instances of Foo,
now we pass seed values through the layout tree so that not only
the struct itself affects layout but also its fields
…kingjubilee

`-Zrandomize-layout` harder. `Foo<T> != Foo<U>`

Tracking issue: rust-lang#106764

Previously randomize-layout only used a deterministic shuffle based on the seed stored in an Adt's ReprOptions, meaning that `Foo<T>`  and `Foo<U>` were shuffled by the same seed. This change adds a similar seed to each calculated LayoutData so that a struct can be randomized both based on the layout of its fields and its per-type seed.
Primitives start with simple seed derived from some of their properties. Though some types can no longer be distinguished at that point, e.g. usize and u64 will still be treated the same.
Improve prose around `as_slice` example of IterMut

I've removed the cryptic message about not being able to call `&mut self` methods while retaining a shared borrow of the iterator, such as `as_slice` produces. This is just normal borrowing rules and does not seem especially relevant here. I can whip up a replacement if someone thinks it has value.
…eemdev

Fix `ptr::from_ref` documentation example comment

The comment says that the expression involves no function call, but that was only true for the example above, the example here _does_ contain a function call.

`@rustbot` label A-docs
…otes, r=BoxyUwU

Add Pin::as_deref_mut to 1.84 relnotes

Resolves rust-lang#131243 - I think this got missed in the relnotes sweep or something.

`@rustbot` label relnotes
Make `bare-fn-no-impl-fn-ptr-99875` test less dependent on path width

This sets diagnostic-width to some arbitrary number. Seems to work on my machine.
…iler-errors

Add tests cases from review of rust-lang#132289

Adding my comments as test-cases as suggested by `@jackh726` in rust-lang#132289 (comment)
…e-error, r=compiler-errors

Cleanup `opaque_type_cycle_error`

Small cleanup opportunity found while reading the code: the `label: bool` var isn't really needed since there's only one execution path that sets is to `true`. Also, tried to reduce right-ward drift.

Best reviewed by hiding whitespace
…-obk

Make sure to walk into nested const blocks in `RegionResolutionVisitor`

Fixes rust-lang#135306

I tried auditing the rest of the visitors that called `.visit_body`, and it seems like this is the only one that was missing it. I wonder if we should modify intravisit (specifcially, that `NestedBodyFilter` stuff) to make this less likely to happen, tho...

r? oli-obk
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 10, 2025
@workingjubilee
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 10, 2025

📌 Commit 5e7dc15 has been approved by workingjubilee

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 Jan 10, 2025
@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)
#21 exporting to docker image format
#21 sending tarball 27.0s done
#21 DONE 34.7s
##[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-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
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-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--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', '--set', 'rust.lld=false', '--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-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
diff of stderr:

19   --> $DIR/impl-fn-predefined-lifetimes.rs:4:35
20    |
21 LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
-    |                                   ^^^^^^^^^^^^^^^ recursive opaque type
+    |                                   |
+    |                                   recursive opaque type
+    |                                   cannot resolve opaque type
23 ...
---
To only update this specific test, also pass `--test-args impl-trait/impl-fn-predefined-lifetimes.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/impl-fn-predefined-lifetimes.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(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/impl-trait/impl-fn-predefined-lifetimes" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
warning: elided lifetime has a name
##[warning]  --> /checkout/tests/ui/impl-trait/impl-fn-predefined-lifetimes.rs:4:48
   |
   |
LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
   |
   = note: `#[warn(elided_named_lifetimes)]` on by default

error[E0792]: expected generic lifetime parameter, found `'_`
error[E0792]: expected generic lifetime parameter, found `'_`
##[error]  --> /checkout/tests/ui/impl-trait/impl-fn-predefined-lifetimes.rs:7:9
   |
LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
   |                                                -- this generic parameter must be used with a generic lifetime parameter
LL |     |x| x
   |         ^

error[E0720]: cannot resolve opaque type
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/impl-fn-predefined-lifetimes.rs:4:35
   |
LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
   |                                   |
   |                                   recursive opaque type
   |                                   cannot resolve opaque type
...
...
LL |     |x| x
   |     ----- returning here with type `{closure@/checkout/tests/ui/impl-trait/impl-fn-predefined-lifetimes.rs:7:5: 7:8}`
error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0720, E0792.
For more information about an error, try `rustc --explain E0720`.
---
diff of stderr:

2   --> $DIR/issue-100075.rs:13:37
3    |
4 LL | fn _g<T>(t: &'static T) -> &'static impl Marker {
-    |                                     ^^^^^^^^^^^ recursive opaque type
+    |                                     |
+    |                                     recursive opaque type
+    |                                     cannot resolve opaque type
6 ...
---
To only update this specific test, also pass `--test-args impl-trait/issue-100075.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/issue-100075.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(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/impl-trait/issue-100075" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/issue-100075.rs:13:37
   |
   |
LL | fn _g<T>(t: &'static T) -> &'static impl Marker {
   |                                     |
   |                                     recursive opaque type
   |                                     cannot resolve opaque type
...
---
To only update this specific test, also pass `--test-args impl-trait/issue-100075-2.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/issue-100075-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/stage2" "--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/impl-trait/issue-100075-2" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
warning: function cannot return without recursing
##[warning]  --> /checkout/tests/ui/impl-trait/issue-100075-2.rs:1:1
   |
---
+    |             |
+    |             recursive opaque type
+    |             cannot resolve opaque type
18 ...
19 LL |     wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
20    |     ----------------------------------------------- returning here with type `impl Fn()`

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 impl-trait/issue-87450.rs`
To only update this specific test, also pass `--test-args impl-trait/issue-87450.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/issue-87450.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(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/impl-trait/issue-87450" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
warning: function cannot return without recursing
##[warning]  --> /checkout/tests/ui/impl-trait/issue-87450.rs:5:1
   |
   |
LL | fn foo() -> impl Fn() {
   | ^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
...
LL |     wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
   |                                        ----- recursive call site
   = help: a `loop` may express intention better if this is on purpose
   = note: `#[warn(unconditional_recursion)]` on by default

error[E0720]: cannot resolve opaque type
---
   |             |
   |             recursive opaque type
   |             cannot resolve opaque type
...
LL |     wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
   |     ----------------------------------------------- returning here with type `impl Fn()`
LL | fn wrap(f: impl Fn()) -> impl Fn() {
   |                          --------- returning this opaque type `impl Fn()`

error: aborting due to 1 previous error; 1 warning emitted
---
diff of stderr:

2   --> $DIR/infinite-impl-trait-issue-38064.rs:8:13
3    |
4 LL | fn foo() -> impl Quux {
-    |             ^^^^^^^^^ recursive opaque type
+    |             |
+    |             recursive opaque type
+    |             cannot resolve opaque type
6 ...
6 ...
7 LL |     Foo(bar())
8    |     ---------- returning here with type `Foo<impl Quux>`

17    |             --------- returning this type `Bar<impl Quux>`
18 ...
19 LL | fn bar() -> impl Quux {
-    |             ^^^^^^^^^ recursive opaque type
+    |             |
+    |             recursive opaque type
+    |             cannot resolve opaque type
21 ...
21 ...
22 LL |     Bar(foo())
23    |     ---------- returning here with type `Bar<impl Quux>`

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 impl-trait/issues/infinite-impl-trait-issue-38064.rs`
To only update this specific test, also pass `--test-args impl-trait/issues/infinite-impl-trait-issue-38064.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/issues/infinite-impl-trait-issue-38064.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(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/impl-trait/issues/infinite-impl-trait-issue-38064" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/issues/infinite-impl-trait-issue-38064.rs:8:13
   |
   |
LL | fn foo() -> impl Quux { //~ ERROR cannot resolve opaque type
   |             |
   |             recursive opaque type
   |             cannot resolve opaque type
...
...
LL |     Foo(bar())
   |     ---------- returning here with type `Foo<impl Quux>`
...
LL | fn bar() -> impl Quux { //~ ERROR cannot resolve opaque type
   |             --------- returning this type `Foo<impl Quux>`
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/issues/infinite-impl-trait-issue-38064.rs:14:13
   |
   |
LL | fn foo() -> impl Quux { //~ ERROR cannot resolve opaque type
   |             --------- returning this type `Bar<impl Quux>`
...
LL | fn bar() -> impl Quux { //~ ERROR cannot resolve opaque type
   |             |
   |             recursive opaque type
   |             cannot resolve opaque type
...
...
LL |     Bar(foo())
   |     ---------- returning here with type `Bar<impl Quux>`
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0720`.
------------------------------------------
---
To only update this specific test, also pass `--test-args impl-trait/recursive-impl-trait-type-through-non-recursive.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/recursive-impl-trait-type-through-non-recursive.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(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/impl-trait/recursive-impl-trait-type-through-non-recursive" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-through-non-recursive.rs:7:22
   |
   |
LL | fn id<T>(t: T) -> impl Sized { t }
LL |
LL |
LL | fn recursive_id() -> impl Sized { //~ ERROR cannot resolve opaque type
   |                      |
   |                      recursive opaque type
   |                      cannot resolve opaque type
LL |     id(recursive_id2())
LL |     id(recursive_id2())
   |     ------------------- returning here with type `impl Sized`

error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-through-non-recursive.rs:11:23
   |
LL | fn id<T>(t: T) -> impl Sized { t }
...
...
LL | fn recursive_id2() -> impl Sized { //~ ERROR cannot resolve opaque type
   |                       |
   |                       recursive opaque type
   |                       cannot resolve opaque type
LL |     id(recursive_id())
LL |     id(recursive_id())
   |     ------------------ returning here with type `impl Sized`

error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-through-non-recursive.rs:17:24
   |
LL | fn wrap<T>(t: T) -> impl Sized { (t,) }
LL |
LL |
LL | fn recursive_wrap() -> impl Sized { //~ ERROR cannot resolve opaque type
   |                        |
   |                        recursive opaque type
   |                        cannot resolve opaque type
LL |     wrap(recursive_wrap2())
LL |     wrap(recursive_wrap2())
   |     ----------------------- returning here with type `impl Sized`

error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-through-non-recursive.rs:21:25
   |
LL | fn wrap<T>(t: T) -> impl Sized { (t,) }
...
...
LL | fn recursive_wrap2() -> impl Sized { //~ ERROR cannot resolve opaque type
   |                         |
   |                         recursive opaque type
   |                         cannot resolve opaque type
LL |     wrap(recursive_wrap())
---
+    |                      |
+    |                      recursive opaque type
+    |                      cannot resolve opaque type
6 LL |
7 LL |     if i < 0 { None } else { Some((option(i - 1), i)) }
8    |                ----          ------------------------ returning here with type `Option<(impl Sized, i32)>`
13   --> $DIR/recursive-impl-trait-type-indirect.rs:11:15
14    |
15 LL | fn tuple() -> impl Sized {
-    |               ^^^^^^^^^^ recursive opaque type
---
+    |               |
+    |               recursive opaque type
+    |               cannot resolve opaque type
26 LL |
27 LL |     [array()]
28    |     --------- returning here with type `[impl Sized; 1]`
31   --> $DIR/recursive-impl-trait-type-indirect.rs:21:13
32    |
33 LL | fn ptr() -> impl Sized {
-    |             ^^^^^^^^^^ recursive opaque type
---
+    |                                   |
+    |                                   recursive opaque type
+    |                                   cannot resolve opaque type
108 LL |
109 LL |     (substs_change::<&T>(),)
110    |     ------------------------ returning here with type `(impl Sized,)`
113   --> $DIR/recursive-impl-trait-type-indirect.rs:78:26
114    |
115 LL | fn mutual_recursion() -> impl Sync {
-    |                          ^^^^^^^^^ recursive opaque type
---
To only update this specific test, also pass `--test-args impl-trait/recursive-impl-trait-type-indirect.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/recursive-impl-trait-type-indirect.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(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/impl-trait/recursive-impl-trait-type-indirect" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:6:22
   |
   |
LL | fn option(i: i32) -> impl Sized {
   |                      ^^^^^^^^^^
   |                      |
   |                      recursive opaque type
   |                      cannot resolve opaque type
LL |     //~^ ERROR cannot resolve opaque type
LL |     if i < 0 { None } else { Some((option(i - 1), i)) }
   |                ----          ------------------------ returning here with type `Option<(impl Sized, i32)>`
   |                |
   |                returning here with type `Option<(impl Sized, i32)>`
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:11:15
   |
LL | fn tuple() -> impl Sized {
---
LL | fn array() -> impl Sized {
   |               ^^^^^^^^^^
   |               |
   |               recursive opaque type
   |               cannot resolve opaque type
LL |     //~^ ERROR
LL |     [array()]
   |     --------- returning here with type `[impl Sized; 1]`
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:21:13
   |
LL | fn ptr() -> impl Sized {
---
LL | /     move || {
LL | |         x;
   | |         - closure captures itself here
LL | |     }
   | |_____- returning here with type `{closure@/checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:34:5: 34:12}`
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:39:29
   |
LL |   fn closure_ref_capture() -> impl Sized {
---
LL | /     move || {
LL | |         &x;
   | |          - closure captures itself here
LL | |     }
   | |_____- returning here with type `{closure@/checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:42:5: 42:12}`
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:47:21
   |
LL | fn closure_sig() -> impl Sized {
LL | fn closure_sig() -> impl Sized {
   |                     ^^^^^^^^^^
   |                     |
   |                     recursive opaque type
   |                     cannot resolve opaque type
LL |     //~^ ERROR
LL |     || closure_sig()
   |     ---------------- returning here with type `{closure@/checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:49:5: 49:7}`
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:52:23
   |
LL | fn coroutine_sig() -> impl Sized {
LL | fn coroutine_sig() -> impl Sized {
   |                       ^^^^^^^^^^
   |                       |
   |                       recursive opaque type
   |                       cannot resolve opaque type
LL |     //~^ ERROR
LL |     || coroutine_sig()
   |     ------------------ returning here with type `{closure@/checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:54:5: 54:7}`
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:57:27
   |
LL |   fn coroutine_capture() -> impl Sized {
---
LL | |         yield;
LL | |         x;
   | |         - coroutine captures itself here
LL | |     }
   | |_____- returning here with type `{coroutine@/checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:62:5: 62:12}`
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:68:35
   |
LL | fn substs_change<T: 'static>() -> impl Sized {
LL | fn substs_change<T: 'static>() -> impl Sized {
   |                                   ^^^^^^^^^^
   |                                   |
   |                                   recursive opaque type
   |                                   cannot resolve opaque type
LL |     //~^ ERROR
LL |     (substs_change::<&T>(),)
   |     ------------------------ returning here with type `(impl Sized,)`
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs:78:26
   |
LL | fn mutual_recursion() -> impl Sync {
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/infinite-cycle-involving-weak.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/type-alias-impl-trait/infinite-cycle-involving-weak.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(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/infinite-cycle-involving-weak" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0720]: cannot resolve opaque type
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs:3:10
   |

@compiler-errors
Copy link
Member

Probably #135307, :'( darn CI being broken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-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-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.