about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/basic.js
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2022-01-29 11:44:30 -0800
committerDavid Tolnay <dtolnay@gmail.com>2022-01-30 11:53:11 -0800
commit1dd02e32a360f64c6fedbd5f1eecaced9f9f08a1 (patch)
tree93975c67de3ff19c3631fbf43c79dabe5d9e3f1c /src/test/rustdoc-js-std/basic.js
parent7cc28c128be0363d83accf318b87b40ba6168384 (diff)
downloadrust-1dd02e32a360f64c6fedbd5f1eecaced9f9f08a1.tar.gz
rust-1dd02e32a360f64c6fedbd5f1eecaced9f9f08a1.zip
Add regression test for issue 93274
Currently fails with:

    error: future cannot be sent between threads safely
      --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:21:17
       |
    LL |     assert_send(with_await());
       |                 ^^^^^^^^^^^^ future returned by `with_await` is not `Send`
       |
       = help: the trait `Sync` is not implemented for `core::fmt::Opaque`
    note: future is not `Send` as this value is used across an await
      --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:11:37
       |
    LL |     println!("{} {:?}", "", async {}.await);
       |     --------------------------------^^^^^^-
       |     |                               |
       |     |                               await occurs here, with `$crate::format_args_nl!($($arg)*)` maybe used later
       |     has type `ArgumentV1<'_>` which is not `Send`
       |     `$crate::format_args_nl!($($arg)*)` is later dropped here
    note: required by a bound in `assert_send`
      --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:18:24
       |
    LL | fn assert_send(_: impl Send) {}
       |                        ^^^^ required by this bound in `assert_send`

    error: future cannot be sent between threads safely
      --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:22:17
       |
    LL |     assert_send(with_macro_call());
       |                 ^^^^^^^^^^^^^^^^^ future returned by `with_macro_call` is not `Send`
       |
       = help: the trait `Sync` is not implemented for `core::fmt::Opaque`
    note: future is not `Send` as this value is used across an await
      --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:6:17
       |
    LL |         async {}.await
       |                 ^^^^^^ await occurs here, with `$crate::format_args_nl!($($arg)*)` maybe used later
    ...
    LL |     println!("{} {:?}", "", m!());
       |     -----------------------------
       |     |                       |
       |     |                       in this macro invocation
       |     has type `ArgumentV1<'_>` which is not `Send`
       |     `$crate::format_args_nl!($($arg)*)` is later dropped here
    note: required by a bound in `assert_send`
      --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:18:24
       |
    LL | fn assert_send(_: impl Send) {}
       |                        ^^^^ required by this bound in `assert_send`
       = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: aborting due to 2 previous errors
Diffstat (limited to 'src/test/rustdoc-js-std/basic.js')
0 files changed, 0 insertions, 0 deletions