diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
commit | 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch) | |
tree | d325add32978dbdc1db975a438b3a77d571b1ab8 /tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr | |
parent | Releasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr')
-rw-r--r-- | tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr b/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr new file mode 100644 index 000000000..5cec21d89 --- /dev/null +++ b/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr @@ -0,0 +1,120 @@ +error: future cannot be sent between threads safely + --> $DIR/async-fn-nonsend.rs:70:17 + | +LL | assert_send(local_dropped_before_await()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `local_dropped_before_await` is not `Send` + | + = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` +note: future is not `Send` as this value is used across an await + --> $DIR/async-fn-nonsend.rs:27:10 + | +LL | let x = non_send(); + | - has type `impl Debug` which is not `Send` +LL | drop(x); +LL | fut().await; + | ^^^^^^ await occurs here, with `x` maybe used later +LL | } + | - `x` is later dropped here +note: required by a bound in `assert_send` + --> $DIR/async-fn-nonsend.rs:67:24 + | +LL | fn assert_send(_: impl Send) {} + | ^^^^ required by this bound in `assert_send` + +error: future cannot be sent between threads safely + --> $DIR/async-fn-nonsend.rs:72:17 + | +LL | assert_send(non_send_temporary_in_match()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send` + | + = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` +note: future is not `Send` as this value is used across an await + --> $DIR/async-fn-nonsend.rs:36:25 + | +LL | match Some(non_send()) { + | ---------- has type `impl Debug` which is not `Send` +LL | Some(_) => fut().await, + | ^^^^^^ await occurs here, with `non_send()` maybe used later +... +LL | } + | - `non_send()` is later dropped here +note: required by a bound in `assert_send` + --> $DIR/async-fn-nonsend.rs:67:24 + | +LL | fn assert_send(_: impl Send) {} + | ^^^^ required by this bound in `assert_send` + +error: future cannot be sent between threads safely + --> $DIR/async-fn-nonsend.rs:74:17 + | +LL | assert_send(non_sync_with_method_call()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send` + | + = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write` +note: future is not `Send` as this value is used across an await + --> $DIR/async-fn-nonsend.rs:49:14 + | +LL | let f: &mut std::fmt::Formatter = &mut get_formatter(); + | --------------- has type `Formatter<'_>` which is not `Send` +... +LL | fut().await; + | ^^^^^^ await occurs here, with `get_formatter()` maybe used later +LL | } +LL | } + | - `get_formatter()` is later dropped here +note: required by a bound in `assert_send` + --> $DIR/async-fn-nonsend.rs:67:24 + | +LL | fn assert_send(_: impl Send) {} + | ^^^^ required by this bound in `assert_send` + +error: future cannot be sent between threads safely + --> $DIR/async-fn-nonsend.rs:76:17 + | +LL | assert_send(non_sync_with_method_call_panic()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_panic` is not `Send` + | + = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write` +note: future is not `Send` as this value is used across an await + --> $DIR/async-fn-nonsend.rs:56:14 + | +LL | let f: &mut std::fmt::Formatter = panic!(); + | - has type `&mut Formatter<'_>` which is not `Send` +LL | if non_sync().fmt(f).unwrap() == () { +LL | fut().await; + | ^^^^^^ await occurs here, with `f` maybe used later +LL | } +LL | } + | - `f` is later dropped here +note: required by a bound in `assert_send` + --> $DIR/async-fn-nonsend.rs:67:24 + | +LL | fn assert_send(_: impl Send) {} + | ^^^^ required by this bound in `assert_send` + +error: future cannot be sent between threads safely + --> $DIR/async-fn-nonsend.rs:78:17 + | +LL | assert_send(non_sync_with_method_call_infinite_loop()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_infinite_loop` is not `Send` + | + = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write` +note: future is not `Send` as this value is used across an await + --> $DIR/async-fn-nonsend.rs:63:14 + | +LL | let f: &mut std::fmt::Formatter = loop {}; + | - has type `&mut Formatter<'_>` which is not `Send` +LL | if non_sync().fmt(f).unwrap() == () { +LL | fut().await; + | ^^^^^^ await occurs here, with `f` maybe used later +LL | } +LL | } + | - `f` is later dropped here +note: required by a bound in `assert_send` + --> $DIR/async-fn-nonsend.rs:67:24 + | +LL | fn assert_send(_: impl Send) {} + | ^^^^ required by this bound in `assert_send` + +error: aborting due to 5 previous errors + |