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

WIP: Remove ResumeTy from async lowering #107562

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Swatinem
Copy link
Contributor

@Swatinem Swatinem commented Feb 1, 2023

Instead of using the stdlib supported ResumeTy, which is being converting to a &mut Context<'_> during the Generator MIR pass, this will use &mut Context<'_> directly in HIR lowering.

It pretty much reverts #105977 and re-applies an updated version of #105250.

This still fails the testcase added in #106264 however, for reasons I don’t understand.

Is blocked on:

@rustbot
Copy link
Collaborator

rustbot commented Feb 1, 2023

r? @compiler-errors

(rustbot has picked a reviewer for you, use r? to override)

@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. labels Feb 1, 2023
@compiler-errors
Copy link
Member

I'm gonna mark this as blocked for now

@rustbot blocked

@rustbot rustbot added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 1, 2023
@bors
Copy link
Contributor

bors commented Feb 17, 2023

☔ The latest upstream changes (presumably #108159) made this pull request unmergeable. Please resolve the merge conflicts.

@Swatinem
Copy link
Contributor Author

Now that #107421 has landed, I rebased this, but it is still failing on the testcase in #106264 :-(

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Oct 20, 2023

☔ The latest upstream changes (presumably #116958) made this pull request unmergeable. Please resolve the merge conflicts.

@Swatinem Swatinem force-pushed the async-resumety-v2 branch 2 times, most recently from aa9f535 to 90ef563 Compare December 28, 2023 11:32
@Swatinem
Copy link
Contributor Author

I rebased this again after all the changes to coroutines and gen blocks.

The failing test in tests/ui/async-await/issue-105501.rs yields a wildly differenterror[E0308]: mismatched types now.
Running this with -Znext-solver outputs a much more readable error[E0277]: `{async block@…}` cannot be sent between threads safely.
Though it would obviously be better if it did not error at all :-)

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Dec 28, 2023

☔ The latest upstream changes (presumably #119174) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 16, 2024

☔ The latest upstream changes (presumably #116520) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 6, 2024

☔ The latest upstream changes (presumably #122045) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jun 24, 2024

☔ The latest upstream changes (presumably #126784) made this pull request unmergeable. Please resolve the merge conflicts.

Instead of using the stdlib supported `ResumeTy`, which is being converting to a `&mut Context<'_>` during the Generator MIR pass,
this will use `&mut Context<'_>` directly in HIR lowering.

It pretty much reverts rust-lang#105977 and re-applies an updated version of rust-lang#105250.

This still fails the testcase added in rust-lang#106264 however, for reasons I don’t understand.
@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)
------
 > importing cache manifest from ghcr.io/rust-lang/rust-ci-cache:3aacb9c90579defe09351ac5e8ee504359f8054da6326ff19038f1b7c90e3cb2aafe33685c6d9b76ee8d2ccbd187ca80c46ab5380485abdd8c0ce7d69cd8d8fd:
------
##[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', '--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-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
---- [ui] tests/ui/async-await/async-closures/constrained-but-no-upvars-yet.rs#next stdout ----

error in revision `next`: test compilation failed although it shouldn't!
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/async-await/async-closures/constrained-but-no-upvars-yet.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" "next" "--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" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/async-closures/constrained-but-no-upvars-yet.next" "-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/async-await/async-closures/constrained-but-no-upvars-yet.next/auxiliary" "--edition=2021" "-Znext-solver"
--- stderr -------------------------------
error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/async-await/async-closures/constrained-but-no-upvars-yet.rs:17:1
   |
   |
LL | async fn async_call_once<T>(f: impl async FnOnce() -> T) -> T {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{async fn body of async_call_once<T, impl async FnOnce() -> T>()}`, got `{async fn body of async_call_once<T, impl async FnOnce() -> T>()}`
   = note: previous use here

error: aborting due to 1 previous error
------------------------------------------
------------------------------------------


---- [ui] tests/ui/async-await/async-closures/higher-ranked-return.rs stdout ----
diff of stderr:

9 LL | |             x
10 LL | |         };
11    | |_________^ returning this value requires that `'1` must outlive `'2`
+    = note: requirement occurs because of a mutable reference to `Context<'_>`
+    = note: mutable references are invariant over their type parameter
+    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
12 
---
To only update this specific test, also pass `--test-args async-await/async-closures/higher-ranked-return.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/async-await/async-closures/higher-ranked-return.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/async-await/async-closures/higher-ranked-return" "-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/async-await/async-closures/higher-ranked-return/auxiliary" "--edition=2021"
--- stderr -------------------------------
error: lifetime may not live long enough
##[error]  --> /checkout/tests/ui/async-await/async-closures/higher-ranked-return.rs:13:46
   |
   |
LL |           let x = async move |x: &str| -> &str {
   |  ________________________________-________----_^
   | |                                |        |
   | |                                |        return type of async closure `{async closure body@/checkout/tests/ui/async-await/async-closures/higher-ranked-return.rs:13:46: 15:10}` contains a lifetime `'2`
   | |                                let's call the lifetime of this reference `'1`
LL | |         };
LL | |         };
   | |_________^ returning this value requires that `'1` must outlive `'2`
   = note: requirement occurs because of a mutable reference to `Context<'_>`
   = note: mutable references are invariant over their type parameter
   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance

---
---- [ui] tests/ui/async-await/async-closures/is-fn.rs#next stdout ----

error in revision `next`: test compilation failed although it shouldn't!
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/async-await/async-closures/is-fn.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" "next" "--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" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/async-closures/is-fn.next" "-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/async-await/async-closures/is-fn.next/auxiliary" "--edition=2021" "-Znext-solver"
--- stderr -------------------------------
error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/async-await/async-closures/is-fn.rs:18:9
   |
   |
LL |         async fn call_once<F: Future>(x: impl FnOnce(&'static str) -> F) -> F::Output {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{async fn body of main::{closure#0}::call_once<F, impl FnOnce(&'static str) -> F>()}`, got `{async fn body of main::{closure#0}::call_once<F, impl FnOnce(&'static str) -> F>()}`
   = note: previous use here

error: aborting due to 1 previous error
------------------------------------------
------------------------------------------


---- [ui] tests/ui/async-await/async-closures/not-lending.rs stdout ----
diff of stderr:

8    |                 lifetime `'1` represents this closure's body
9    |
10    = note: closure implements `Fn`, so references to captured variables can't escape the closure
+    = note: requirement occurs because of a mutable reference to `Context<'_>`
+    = note: mutable references are invariant over their type parameter
+    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
12 error: lifetime may not live long enough
13   --> $DIR/not-lending.rs:18:31


19    |                 lifetime `'1` represents this closure's body
20    |
21    = note: closure implements `Fn`, so references to captured variables can't escape the closure
+    = note: requirement occurs because of a mutable reference to `Context<'_>`
+    = note: mutable references are invariant over their type parameter
+    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
23 error: aborting due to 2 previous errors
24 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/async-closures/not-lending/not-lending.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args async-await/async-closures/not-lending.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/async-await/async-closures/not-lending.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/async-await/async-closures/not-lending" "-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/async-await/async-closures/not-lending/auxiliary" "--edition=2021"
--- stderr -------------------------------
error: lifetime may not live long enough
##[error]  --> /checkout/tests/ui/async-await/async-closures/not-lending.rs:14:42
   |
   |
LL |         let x = async move || -> &String { &s };
   |                 ------------------------ ^^^^^^ returning this value requires that `'1` must outlive `'2`
   |                 |                |
   |                 |                return type of async closure `{async closure body@/checkout/tests/ui/async-await/async-closures/not-lending.rs:14:42: 14:48}` contains a lifetime `'2`
   |                 lifetime `'1` represents this closure's body
   |
   = note: closure implements `Fn`, so references to captured variables can't escape the closure
   = note: requirement occurs because of a mutable reference to `Context<'_>`
   = note: mutable references are invariant over their type parameter
   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
error: lifetime may not live long enough
##[error]  --> /checkout/tests/ui/async-await/async-closures/not-lending.rs:18:31
   |
   |
LL |         let x = async move || { &s };
   |                 ------------- ^^^^^^ returning this value requires that `'1` must outlive `'2`
   |                 |           |
   |                 |           return type of async closure `{async closure body@/checkout/tests/ui/async-await/async-closures/not-lending.rs:18:31: 18:37}` contains a lifetime `'2`
   |                 lifetime `'1` represents this closure's body
   |
   = note: closure implements `Fn`, so references to captured variables can't escape the closure
   = note: requirement occurs because of a mutable reference to `Context<'_>`
   = note: mutable references are invariant over their type parameter
   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
error: aborting due to 2 previous errors
------------------------------------------



---- [ui] tests/ui/async-await/async-closures/once.rs#next stdout ----

error in revision `next`: test compilation failed although it shouldn't!
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/async-await/async-closures/once.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" "next" "--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" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/async-closures/once.next" "-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/async-await/async-closures/once.next/auxiliary" "--edition=2021" "-Znext-solver"
--- stderr -------------------------------
error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/async-await/async-closures/once.rs:18:9
   |
   |
LL |         async fn call_once<F: Future>(x: impl FnOnce(&'static str) -> F) -> F::Output {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{async fn body of main::{closure#0}::call_once<F, impl FnOnce(&'static str) -> F>()}`, got `{async fn body of main::{closure#0}::call_once<F, impl FnOnce(&'static str) -> F>()}`
   = note: previous use here

error: aborting due to 1 previous error
------------------------------------------
------------------------------------------


---- [ui] tests/ui/async-await/async-fn/higher-ranked-async-fn.rs#next stdout ----

error in revision `next`: test compilation failed although it shouldn't!
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/async-await/async-fn/higher-ranked-async-fn.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" "next" "--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" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/async-fn/higher-ranked-async-fn.next" "-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/async-await/async-fn/higher-ranked-async-fn.next/auxiliary" "--edition=2018" "-Znext-solver"
--- stderr -------------------------------
error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/async-await/async-fn/higher-ranked-async-fn.rs:16:1
   |
   |
LL | / async fn func<F>(f: F)
LL | | where
LL | |     F: for<'a> async Fn(&'a i32),
   | |_________________________________^ expected `{async fn body of func<F>()}`, got `{async fn body of func<F>()}`
   = note: previous use here

error: aborting due to 1 previous error
------------------------------------------
------------------------------------------


---- [ui] tests/ui/async-await/issue-105501.rs stdout ----

error: test compilation failed although it shouldn't!
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/async-await/issue-105501.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/async-await/issue-105501" "-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/async-await/issue-105501/auxiliary" "--edition=2018"
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/async-await/issue-105501.rs:25:5
   |
   |
LL |               .then(|_| async {})
   |                         |
   |                         the expected `async` block
   |                         the found `async` block
...
...
LL | /     is_send(async move {
LL | |         let _: Option<()> = fut.await;
   | |______^ one type is more general than the other
   |
   |
   = note: expected `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
              found `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
   = note: no two async blocks, even if identical, have the same type
   = help: consider pinning your async block and casting it to a trait object
  --> /checkout/tests/ui/async-await/issue-105501.rs:12:20
   |
   |
LL | fn is_send(_: impl Send) {}

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/async-await/issue-105501.rs:25:5
   |
   |
LL |               .then(|_| async {})
   |                         |
   |                         the expected `async` block
   |                         the found `async` block
...
...
LL | /     is_send(async move {
LL | |         let _: Option<()> = fut.await;
   | |______^ one type is more general than the other
   |
   |
   = note: expected `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
              found `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
   = note: no two async blocks, even if identical, have the same type
   = help: consider pinning your async block and casting it to a trait object
  --> /checkout/tests/ui/async-await/issue-105501.rs:12:20
   |
   |
LL | fn is_send(_: impl Send) {}
   |                    ^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/async-await/issue-105501.rs:25:5
   |
   |
LL |               .then(|_| async {})
   |                         |
   |                         the expected `async` block
   |                         the found `async` block
...
...
LL | /     is_send(async move {
LL | |         let _: Option<()> = fut.await;
   | |______^ one type is more general than the other
   |
   |
   = note: expected `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
              found `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
   = note: no two async blocks, even if identical, have the same type
   = help: consider pinning your async block and casting it to a trait object
  --> /checkout/tests/ui/async-await/issue-105501.rs:12:20
   |
   |
LL | fn is_send(_: impl Send) {}
   |                    ^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/async-await/issue-105501.rs:25:5
   |
   |
LL |               .then(|_| async {})
   |                         |
   |                         the expected `async` block
   |                         the found `async` block
...
...
LL | /     is_send(async move {
LL | |         let _: Option<()> = fut.await;
   | |______^ one type is more general than the other
   |
   |
   = note: expected `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
              found `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
   = note: no two async blocks, even if identical, have the same type
   = help: consider pinning your async block and casting it to a trait object
  --> /checkout/tests/ui/async-await/issue-105501.rs:12:20
   |
   |
LL | fn is_send(_: impl Send) {}
   |                    ^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/async-await/issue-105501.rs:25:5
   |
   |
LL |               .then(|_| async {})
   |                         |
   |                         the expected `async` block
   |                         the found `async` block
...
...
LL | /     is_send(async move {
LL | |         let _: Option<()> = fut.await;
   | |______^ one type is more general than the other
   |
   |
   = note: expected `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
              found `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
   = note: no two async blocks, even if identical, have the same type
   = help: consider pinning your async block and casting it to a trait object
  --> /checkout/tests/ui/async-await/issue-105501.rs:12:20
   |
   |
LL | fn is_send(_: impl Send) {}
   |                    ^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/async-await/issue-105501.rs:25:5
   |
   |
LL |               .then(|_| async {})
   |                         |
   |                         the expected `async` block
   |                         the found `async` block
...
...
LL | /     is_send(async move {
LL | |         let _: Option<()> = fut.await;
   | |______^ one type is more general than the other
   |
   |
   = note: expected `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
              found `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
   = note: no two async blocks, even if identical, have the same type
   = help: consider pinning your async block and casting it to a trait object
  --> /checkout/tests/ui/async-await/issue-105501.rs:12:20
   |
   |
LL | fn is_send(_: impl Send) {}
   |                    ^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/async-await/issue-105501.rs:25:5
   |
   |
LL |               .then(|_| async {})
   |                         |
   |                         the expected `async` block
   |                         the found `async` block
...
...
LL | /     is_send(async move {
LL | |         let _: Option<()> = fut.await;
   | |______^ one type is more general than the other
   |
   |
   = note: expected `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
              found `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
   = note: no two async blocks, even if identical, have the same type
   = help: consider pinning your async block and casting it to a trait object
  --> /checkout/tests/ui/async-await/issue-105501.rs:12:20
   |
   |
LL | fn is_send(_: impl Send) {}
   |                    ^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/async-await/issue-105501.rs:25:5
   |
   |
LL |               .then(|_| async {})
   |                         |
   |                         the expected `async` block
   |                         the found `async` block
...
...
LL | /     is_send(async move {
LL | |         let _: Option<()> = fut.await;
   | |______^ one type is more general than the other
   |
   |
   = note: expected `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
              found `async` block `{async block@/checkout/tests/ui/async-await/issue-105501.rs:17:23: 17:28}`
   = note: no two async blocks, even if identical, have the same type
   = help: consider pinning your async block and casting it to a trait object
  --> /checkout/tests/ui/async-await/issue-105501.rs:12:20
   |
   |
LL | fn is_send(_: impl Send) {}
   |                    ^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 8 previous errors

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


---- [ui] tests/ui/async-await/issue-74072-lifetime-name-annotations.rs stdout ----
diff of stderr:

40    | |_____^ returning this value requires that `'1` must outlive `'2`
41    |
42    = note: closure implements `FnMut`, so references to captured variables can't escape the closure
+    = note: requirement occurs because of a mutable reference to `Context<'_>`
+    = note: mutable references are invariant over their type parameter
+    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
44 error[E0716]: temporary value dropped while borrowed
45   --> $DIR/issue-74072-lifetime-name-annotations.rs:14:5


89    | |_____^ returning this value requires that `'1` must outlive `'2`
90    |
91    = note: closure implements `FnMut`, so references to captured variables can't escape the closure
+    = note: requirement occurs because of a mutable reference to `Context<'_>`
+    = note: mutable references are invariant over their type parameter
+    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
93 error[E0716]: temporary value dropped while borrowed
94   --> $DIR/issue-74072-lifetime-name-annotations.rs:24:5



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issue-74072-lifetime-name-annotations/issue-74072-lifetime-name-annotations.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args async-await/issue-74072-lifetime-name-annotations.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/async-await/issue-74072-lifetime-name-annotations.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/async-await/issue-74072-lifetime-name-annotations" "-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/async-await/issue-74072-lifetime-name-annotations/auxiliary" "--edition=2018"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0506]: cannot assign to `*x` because it is borrowed
   |
   |
LL | pub async fn async_fn(x: &mut i32) -> &i32 {
   |                          - let's call the lifetime of this reference `'1`
LL |     let y = &*x;
   |             --- `*x` is borrowed here
LL |     *x += 1; //~ ERROR cannot assign to `*x` because it is borrowed
   |     ^^^^^^^ `*x` is assigned to here but it was already borrowed
LL |     y
   |     - returning this value requires that `*x` is borrowed for `'1`

error[E0506]: cannot assign to `*x` because it is borrowed
   |
   |
LL |     (async move || {
   |                  - return type of async closure is &'1 i32
...
LL |         let y = &*x;
   |                 --- `*x` is borrowed here
LL |         *x += 1; //~ ERROR cannot assign to `*x` because it is borrowed
   |         ^^^^^^^ `*x` is assigned to here but it was already borrowed
LL |         y
   |         - returning this value requires that `*x` is borrowed for `'1`
error: lifetime may not live long enough
##[error]  --> /checkout/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs:14:20
   |
   |
LL |       (async move || {
   |  ______-------------_^
   | |      |           |
   | |      |           return type of async closure `{async closure body@/checkout/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs:14:20: 20:6}` contains a lifetime `'2`
   | |      lifetime `'1` represents this closure's body
LL | |         //~^ ERROR lifetime may not live long enough
LL | |         //~| ERROR temporary value dropped while borrowed
LL | |         let y = &*x;
LL | |         *x += 1; //~ ERROR cannot assign to `*x` because it is borrowed
LL | |     })()
LL | |     })()
   | |_____^ returning this value requires that `'1` must outlive `'2`
   |
   = note: closure implements `FnMut`, so references to captured variables can't escape the closure
   = note: requirement occurs because of a mutable reference to `Context<'_>`
   = note: mutable references are invariant over their type parameter
   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
error[E0716]: temporary value dropped while borrowed
##[error]  --> /checkout/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs:14:5
   |
   |
LL |    pub fn async_closure(x: &mut i32) -> impl Future<Output=&i32> {
   |                            - let's call the lifetime of this reference `'1`
LL | //     (async move || {
LL | ||         //~^ ERROR lifetime may not live long enough
LL | ||         //~| ERROR temporary value dropped while borrowed
LL | ||         let y = &*x;
LL | ||         *x += 1; //~ ERROR cannot assign to `*x` because it is borrowed
LL | ||     })()
LL | ||     })()
   | ||______^_- argument requires that borrow lasts for `'1`
   |         creates a temporary value which is freed while still in use
LL |    }
   |    - temporary value is freed at the end of this statement


error[E0506]: cannot assign to `*x` because it is borrowed
   |
   |
LL |     (async move || -> &i32 {
   |                          - return type of async closure is &'1 i32
...
LL |         let y = &*x;
   |                 --- `*x` is borrowed here
LL |         *x += 1; //~ ERROR cannot assign to `*x` because it is borrowed
   |         ^^^^^^^ `*x` is assigned to here but it was already borrowed
LL |         y
   |         - returning this value requires that `*x` is borrowed for `'1`
error: lifetime may not live long enough
##[error]  --> /checkout/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs:24:28
   |
   |
LL |       (async move || -> &i32 {
   |  ______---------------------_^
   | |      |                |
   | |      |                return type of async closure `{async closure body@/checkout/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs:24:28: 30:6}` contains a lifetime `'2`
   | |      lifetime `'1` represents this closure's body
LL | |         //~^ ERROR lifetime may not live long enough
LL | |         //~| ERROR temporary value dropped while borrowed
LL | |         let y = &*x;
LL | |         *x += 1; //~ ERROR cannot assign to `*x` because it is borrowed
LL | |     })()
LL | |     })()
   | |_____^ returning this value requires that `'1` must outlive `'2`
   |
   = note: closure implements `FnMut`, so references to captured variables can't escape the closure
   = note: requirement occurs because of a mutable reference to `Context<'_>`
   = note: mutable references are invariant over their type parameter
   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
error[E0716]: temporary value dropped while borrowed
##[error]  --> /checkout/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs:24:5
   |
   |
LL |    pub fn async_closure_explicit_return_type(x: &mut i32) -> impl Future<Output=&i32> {
   |                                                 - let's call the lifetime of this reference `'1`
LL | //     (async move || -> &i32 {
LL | ||         //~^ ERROR lifetime may not live long enough
LL | ||         //~| ERROR temporary value dropped while borrowed
LL | ||         let y = &*x;
LL | ||         *x += 1; //~ ERROR cannot assign to `*x` because it is borrowed
LL | ||     })()
LL | ||     })()
   | ||______^_- argument requires that borrow lasts for `'1`
   |         creates a temporary value which is freed while still in use
LL |    }
   |    - temporary value is freed at the end of this statement


error[E0506]: cannot assign to `*x` because it is borrowed
   |
LL |     async move {
LL |     async move {
   |              - return type of async block is &'1 i32
LL |         let y = &*x;
   |                 --- `*x` is borrowed here
LL |         *x += 1; //~ ERROR cannot assign to `*x` because it is borrowed
   |         ^^^^^^^ `*x` is assigned to here but it was already borrowed
LL |         y
   |         - returning this value requires that `*x` is borrowed for `'1`
error: aborting due to 8 previous errors

---
- error: aborting due to 1 previous error
+ error: concrete type differs from previous defining opaque type use
+   --> $DIR/issue-103181-1.rs:72:1
+    |
+ LL | async fn smarvice() -> Result<(), ()> {
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{async fn body of smarvice()}`, got `{async fn body of smarvice()}`
+    = note: previous use here
+ 
+ error: concrete type differs from previous defining opaque type use
+   --> $DIR/issue-103181-1.rs:83:1
+   --> $DIR/issue-103181-1.rs:83:1
+    |
+ LL | async fn iceice() {
+    | ^^^^^^^^^^^^^^^^^ expected `{async fn body of iceice()}`, got `{async fn body of iceice()}`
+    = note: previous use here
+ 
+ error: aborting due to 3 previous errors
11 
---
To only update this specific test, also pass `--test-args impl-trait/issue-103181-1.rs`

error in revision `next`: 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-103181-1.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" "next" "--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/impl-trait/issue-103181-1.next" "-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/issue-103181-1.next/auxiliary" "-Znext-solver" "--edition=2021"
--- stderr -------------------------------
error[E0046]: not all trait items implemented, missing: `Error`
##[error]  --> /checkout/tests/ui/impl-trait/issue-103181-1.rs:12:5
   |
---

error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/impl-trait/issue-103181-1.rs:72:1
   |
LL | async fn smarvice() -> Result<(), ()> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{async fn body of smarvice()}`, got `{async fn body of smarvice()}`
   = note: previous use here

error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/impl-trait/issue-103181-1.rs:83:1
##[error]  --> /checkout/tests/ui/impl-trait/issue-103181-1.rs:83:1
   |
LL | async fn iceice() {
   | ^^^^^^^^^^^^^^^^^ expected `{async fn body of iceice()}`, got `{async fn body of iceice()}`
   = note: previous use here

error: aborting due to 3 previous errors


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


---- [ui] tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs#pass stdout ----

error in revision `pass`: test compilation failed although it shouldn't!
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/traits/next-solver/auto-with-drop_tracking_mir.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" "pass" "--check-cfg" "cfg(FALSE,pass,fail)" "--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/traits/next-solver/auto-with-drop_tracking_mir.pass" "-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/traits/next-solver/auto-with-drop_tracking_mir.pass/auxiliary" "-Znext-solver" "--edition=2021"
--- stderr -------------------------------
error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs:11:1
   |
   |
LL | async fn foo() {
   | ^^^^^^^^^^^^^^ expected `{async fn body of foo()}`, got `{async fn body of foo()}`
   = note: previous use here

error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs:21:1
##[error]  --> /checkout/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs:21:1
   |
LL | async fn bar() {}
   | ^^^^^^^^^^^^^^ expected `{async fn body of bar()}`, got `{async fn body of bar()}`
   = note: previous use here

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


---- [ui] tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs#fail stdout ----
diff of stderr:

18 LL |     fn is_send(_: impl Send) {}
20 
- error: aborting due to 1 previous error
+ error: concrete type differs from previous defining opaque type use
+   --> $DIR/auto-with-drop_tracking_mir.rs:11:1
+   --> $DIR/auto-with-drop_tracking_mir.rs:11:1
+    |
+ LL | async fn foo() {
+    | ^^^^^^^^^^^^^^ expected `{async fn body of foo()}`, got `{async fn body of foo()}`
+    = note: previous use here
+ 
+ error: concrete type differs from previous defining opaque type use
+   --> $DIR/auto-with-drop_tracking_mir.rs:21:1
+   --> $DIR/auto-with-drop_tracking_mir.rs:21:1
+    |
+ LL | async fn bar() {}
+    | ^^^^^^^^^^^^^^ expected `{async fn body of bar()}`, got `{async fn body of bar()}`
+    = note: previous use here
+ 
+ error: aborting due to 3 previous errors
22 
---
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/next-solver/auto-with-drop_tracking_mir.fail/auto-with-drop_tracking_mir.fail.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args traits/next-solver/auto-with-drop_tracking_mir.rs`

error in revision `fail`: 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/traits/next-solver/auto-with-drop_tracking_mir.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" "fail" "--check-cfg" "cfg(FALSE,pass,fail)" "--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/traits/next-solver/auto-with-drop_tracking_mir.fail" "-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/traits/next-solver/auto-with-drop_tracking_mir.fail/auxiliary" "-Znext-solver" "--edition=2021"
--- stderr -------------------------------
error: future cannot be sent between threads safely
##[error]  --> /checkout/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs:25:13
   |
   |
LL |     is_send(foo());
   |             ^^^^^ future returned by `foo` is not `Send`
   |
   = help: the trait `Sync` is not implemented for `NotSync`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
   |
   |
LL |     let x = &NotSync;
   |         - has type `&NotSync` which is not `Send`
LL |     bar().await;
   |           ^^^^^ await occurs here, with `x` maybe used later
  --> /checkout/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs:24:24
   |
   |
LL |     fn is_send(_: impl Send) {}

error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs:11:1
   |
   |
LL | async fn foo() {
   | ^^^^^^^^^^^^^^ expected `{async fn body of foo()}`, got `{async fn body of foo()}`
   = note: previous use here

error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs:21:1
##[error]  --> /checkout/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs:21:1
   |
LL | async fn bar() {}
   | ^^^^^^^^^^^^^^ expected `{async fn body of bar()}`, got `{async fn body of bar()}`
   = note: previous use here

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


---- [ui] tests/ui/traits/next-solver/normalize/normalize-async-closure-in-trait.rs stdout ----

error: test compilation failed although it shouldn't!
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/traits/next-solver/normalize/normalize-async-closure-in-trait.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/traits/next-solver/normalize/normalize-async-closure-in-trait" "-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/traits/next-solver/normalize/normalize-async-closure-in-trait/auxiliary" "-Znext-solver" "--edition=2021"
--- stderr -------------------------------
error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/traits/next-solver/normalize/normalize-async-closure-in-trait.rs:6:5
   |
   |
LL |     async fn bar() {}
   |     ^^^^^^^^^^^^^^ expected `{async fn body of <Self as Foo>::bar()}`, got `{async fn body of <Self as Foo>::bar()}`
   = note: previous use here

error: aborting due to 1 previous error
------------------------------------------
------------------------------------------


---- [ui] tests/ui/typeck/issue-116864.rs stdout ----

error: test compilation failed although it shouldn't!
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/typeck/issue-116864.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/typeck/issue-116864" "-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/typeck/issue-116864/auxiliary" "-Znext-solver" "--edition=2021"
--- stderr -------------------------------
error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/typeck/issue-116864.rs:23:1
   |
   |
LL | / async fn foo<BAZ>(_: BAZ, mut cb: impl for<'any> FnMutFut<&'any BAZ::Param, ()>)
LL | | where
LL | |     BAZ: Baz<Param = i32>,
   | |__________________________^ expected `{async fn body of foo<BAZ, impl for<'any> FnMutFut<&'any BAZ::Param, ()>>()}`, got `{async fn body of foo<BAZ, impl for<'any> FnMutFut<&'any BAZ::Param, ()>>()}`
   = note: previous use here

error: aborting due to 1 previous error
------------------------------------------

@bors
Copy link
Contributor

bors commented Sep 2, 2024

☔ The latest upstream changes (presumably #129873) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants