]> git.lizzy.rs Git - rust.git/blob - src/test/ui/fmt/send-sync.stderr
Move to using an extern type for opaqueness
[rust.git] / src / test / ui / fmt / send-sync.stderr
1 error[E0277]: `core::fmt::Opaque` cannot be shared between threads safely
2   --> $DIR/send-sync.rs:8:5
3    |
4 LL | fn send<T: Send>(_: T) {}
5    |    ----    ---- required by this bound in `send`
6 ...
7 LL |     send(format_args!("{:?}", c));
8    |     ^^^^ `core::fmt::Opaque` cannot be shared between threads safely
9    |
10    = help: within `[std::fmt::ArgumentV1<'_>]`, the trait `std::marker::Sync` is not implemented for `core::fmt::Opaque`
11    = note: required because it appears within the type `&core::fmt::Opaque`
12    = note: required because it appears within the type `std::fmt::ArgumentV1<'_>`
13    = note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]`
14    = note: required because of the requirements on the impl of `std::marker::Send` for `&[std::fmt::ArgumentV1<'_>]`
15    = note: required because it appears within the type `std::fmt::Arguments<'_>`
16
17 error[E0277]: `core::fmt::Opaque` cannot be shared between threads safely
18   --> $DIR/send-sync.rs:9:5
19    |
20 LL | fn sync<T: Sync>(_: T) {}
21    |    ----    ---- required by this bound in `sync`
22 ...
23 LL |     sync(format_args!("{:?}", c));
24    |     ^^^^ `core::fmt::Opaque` cannot be shared between threads safely
25    |
26    = help: within `std::fmt::Arguments<'_>`, the trait `std::marker::Sync` is not implemented for `core::fmt::Opaque`
27    = note: required because it appears within the type `&core::fmt::Opaque`
28    = note: required because it appears within the type `std::fmt::ArgumentV1<'_>`
29    = note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]`
30    = note: required because it appears within the type `&[std::fmt::ArgumentV1<'_>]`
31    = note: required because it appears within the type `std::fmt::Arguments<'_>`
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0277`.