]> git.proxmox.com Git - rustc.git/blame - src/test/ui/phantom-oibit.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / phantom-oibit.stderr
CommitLineData
b7449926 1error[E0277]: `T` cannot be shared between threads safely
e1599b0c 2 --> $DIR/phantom-oibit.rs:21:12
b7449926 3 |
e1599b0c 4LL | fn is_zen<T: Zen>(_: T) {}
ba9703b0 5 | --- required by this bound in `is_zen`
74b04a01 6...
b7449926 7LL | is_zen(x)
e1599b0c 8 | ^ `T` cannot be shared between threads safely
b7449926 9 |
b7449926 10 = note: required because of the requirements on the impl of `Zen` for `&T`
1b1a35ee 11 = note: required because it appears within the type `PhantomData<&T>`
b7449926 12 = note: required because it appears within the type `Guard<'_, T>`
ba9703b0
XL
13help: consider restricting type parameter `T`
14 |
1b1a35ee
XL
15LL | fn not_sync<T: Sync>(x: Guard<T>) {
16 | ^^^^^^
b7449926
XL
17
18error[E0277]: `T` cannot be shared between threads safely
e1599b0c 19 --> $DIR/phantom-oibit.rs:26:12
b7449926 20 |
e1599b0c 21LL | fn is_zen<T: Zen>(_: T) {}
ba9703b0 22 | --- required by this bound in `is_zen`
e1599b0c 23...
b7449926 24LL | is_zen(x)
e1599b0c 25 | ^ `T` cannot be shared between threads safely
b7449926 26 |
b7449926 27 = note: required because of the requirements on the impl of `Zen` for `&T`
1b1a35ee 28 = note: required because it appears within the type `PhantomData<&T>`
b7449926
XL
29 = note: required because it appears within the type `Guard<'_, T>`
30 = note: required because it appears within the type `Nested<Guard<'_, T>>`
ba9703b0
XL
31help: consider restricting type parameter `T`
32 |
1b1a35ee
XL
33LL | fn nested_not_sync<T: Sync>(x: Nested<Guard<T>>) {
34 | ^^^^^^
b7449926
XL
35
36error: aborting due to 2 previous errors
37
38For more information about this error, try `rustc --explain E0277`.