1 error[E0277]: `impl Sync` cannot be sent between threads safely
2 --> $DIR/restrict-type-argument.rs:4:13
5 | ------- ^^^ `impl Sync` cannot be sent between threads safely
7 | required by a bound introduced by this call
9 note: required by a bound in `is_send`
10 --> $DIR/restrict-type-argument.rs:1:15
12 LL | fn is_send<T: Send>(val: T) {}
13 | ^^^^ required by this bound in `is_send`
14 help: consider further restricting this bound
16 LL | fn use_impl_sync(val: impl Sync + std::marker::Send) {
19 error[E0277]: `S` cannot be sent between threads safely
20 --> $DIR/restrict-type-argument.rs:8:13
23 | ------- ^^^ `S` cannot be sent between threads safely
25 | required by a bound introduced by this call
27 note: required by a bound in `is_send`
28 --> $DIR/restrict-type-argument.rs:1:15
30 LL | fn is_send<T: Send>(val: T) {}
31 | ^^^^ required by this bound in `is_send`
32 help: consider further restricting this bound
34 LL | fn use_where<S>(val: S) where S: Sync + std::marker::Send {
37 error[E0277]: `S` cannot be sent between threads safely
38 --> $DIR/restrict-type-argument.rs:12:13
41 | ------- ^^^ `S` cannot be sent between threads safely
43 | required by a bound introduced by this call
45 note: required by a bound in `is_send`
46 --> $DIR/restrict-type-argument.rs:1:15
48 LL | fn is_send<T: Send>(val: T) {}
49 | ^^^^ required by this bound in `is_send`
50 help: consider further restricting this bound
52 LL | fn use_bound<S: Sync + std::marker::Send>(val: S) {
55 error[E0277]: `S` cannot be sent between threads safely
56 --> $DIR/restrict-type-argument.rs:20:13
59 | ------- ^^^ `S` cannot be sent between threads safely
61 | required by a bound introduced by this call
63 note: required by a bound in `is_send`
64 --> $DIR/restrict-type-argument.rs:1:15
66 LL | fn is_send<T: Send>(val: T) {}
67 | ^^^^ required by this bound in `is_send`
68 help: consider further restricting this bound
70 LL | Sync + std::marker::Send
73 error[E0277]: `S` cannot be sent between threads safely
74 --> $DIR/restrict-type-argument.rs:24:13
77 | ------- ^^^ `S` cannot be sent between threads safely
79 | required by a bound introduced by this call
81 note: required by a bound in `is_send`
82 --> $DIR/restrict-type-argument.rs:1:15
84 LL | fn is_send<T: Send>(val: T) {}
85 | ^^^^ required by this bound in `is_send`
86 help: consider further restricting this bound
88 LL | fn use_bound_and_where<S: Sync>(val: S) where S: std::fmt::Debug + std::marker::Send {
91 error[E0277]: `S` cannot be sent between threads safely
92 --> $DIR/restrict-type-argument.rs:28:13
95 | ------- ^^^ `S` cannot be sent between threads safely
97 | required by a bound introduced by this call
99 note: required by a bound in `is_send`
100 --> $DIR/restrict-type-argument.rs:1:15
102 LL | fn is_send<T: Send>(val: T) {}
103 | ^^^^ required by this bound in `is_send`
104 help: consider restricting type parameter `S`
106 LL | fn use_unbound<S: std::marker::Send>(val: S) {
107 | +++++++++++++++++++
109 error: aborting due to 6 previous errors
111 For more information about this error, try `rustc --explain E0277`.