fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.3 KiB35 linesraw
1error[E0277]: `T` cannot be sent between threads safely
2  --> $DIR/builtin-superkinds-double-superkind.rs:6:24
3   |
4LL | trait Foo : Send+Sync { }
5   |             ---- required by this bound in `Foo`
6LL | 
7LL | impl <T: Sync+'static> Foo for (T,) { }
8   |                        ^^^ `T` cannot be sent between threads safely
9   |
10   = help: within `(T,)`, the trait `std::marker::Send` is not implemented for `T`
11   = note: required because it appears within the type `(T,)`
12help: consider further restricting this bound
13   |
14LL | impl <T: Sync+'static + std::marker::Send> Foo for (T,) { }
15   |                       ^^^^^^^^^^^^^^^^^^^
16
17error[E0277]: `T` cannot be shared between threads safely
18  --> $DIR/builtin-superkinds-double-superkind.rs:9:16
19   |
20LL | trait Foo : Send+Sync { }
21   |                  ---- required by this bound in `Foo`
22...
23LL | impl <T: Send> Foo for (T,T) { }
24   |                ^^^ `T` cannot be shared between threads safely
25   |
26   = help: within `(T, T)`, the trait `std::marker::Sync` is not implemented for `T`
27   = note: required because it appears within the type `(T, T)`
28help: consider further restricting this bound
29   |
30LL | impl <T: Send + std::marker::Sync> Foo for (T,T) { }
31   |               ^^^^^^^^^^^^^^^^^^^
32
33error: aborting due to 2 previous errors
34
35For more information about this error, try `rustc --explain E0277`.