1 error[E0277]: `impl Sync` cannot be sent between threads safely
2 --> $DIR/restrict-type-argument.rs:4:13
4 LL | fn is_send<T: Send>(val: T) {}
5 | ---- required by this bound in `is_send`
8 | ^^^ `impl Sync` cannot be sent between threads safely
10 = help: the trait `std::marker::Send` is not implemented for `impl Sync`
11 help: consider further restricting this bound
13 LL | fn use_impl_sync(val: impl Sync + std::marker::Send) {
16 error[E0277]: `S` cannot be sent between threads safely
17 --> $DIR/restrict-type-argument.rs:8:13
19 LL | fn is_send<T: Send>(val: T) {}
20 | ---- required by this bound in `is_send`
23 | ^^^ `S` cannot be sent between threads safely
25 = help: the trait `std::marker::Send` is not implemented for `S`
26 help: consider further restricting this bound
28 LL | fn use_where<S>(val: S) where S: Sync + std::marker::Send {
31 error[E0277]: `S` cannot be sent between threads safely
32 --> $DIR/restrict-type-argument.rs:12:13
34 LL | fn is_send<T: Send>(val: T) {}
35 | ---- required by this bound in `is_send`
38 | ^^^ `S` cannot be sent between threads safely
40 = help: the trait `std::marker::Send` is not implemented for `S`
41 help: consider further restricting this bound
43 LL | fn use_bound<S: Sync + std::marker::Send>(val: S) {
46 error[E0277]: `S` cannot be sent between threads safely
47 --> $DIR/restrict-type-argument.rs:20:13
49 LL | fn is_send<T: Send>(val: T) {}
50 | ---- required by this bound in `is_send`
53 | ^^^ `S` cannot be sent between threads safely
55 = help: the trait `std::marker::Send` is not implemented for `S`
56 help: consider further restricting this bound
58 LL | Sync + std::marker::Send
61 error[E0277]: `S` cannot be sent between threads safely
62 --> $DIR/restrict-type-argument.rs:24:13
64 LL | fn is_send<T: Send>(val: T) {}
65 | ---- required by this bound in `is_send`
68 | ^^^ `S` cannot be sent between threads safely
70 = help: the trait `std::marker::Send` is not implemented for `S`
71 help: consider further restricting this bound
73 LL | fn use_bound_and_where<S: Sync>(val: S) where S: std::fmt::Debug + std::marker::Send {
76 error[E0277]: `S` cannot be sent between threads safely
77 --> $DIR/restrict-type-argument.rs:28:13
79 LL | fn is_send<T: Send>(val: T) {}
80 | ---- required by this bound in `is_send`
83 | ^^^ `S` cannot be sent between threads safely
85 = help: the trait `std::marker::Send` is not implemented for `S`
86 help: consider restricting type parameter `S`
88 LL | fn use_unbound<S: std::marker::Send>(val: S) {
91 error: aborting due to 6 previous errors
93 For more information about this error, try `rustc --explain E0277`.