| error[E0277]: `impl Sync` cannot be sent between threads safely |
| --> $DIR/restrict-type-argument.rs:4:13 |
| | |
| LL | fn is_send<T: Send>(val: T) {} |
| | ------- ---- required by this bound in `is_send` |
| ... |
| LL | is_send(val); |
| | ^^^ `impl Sync` cannot be sent between threads safely |
| | |
| = help: the trait `std::marker::Send` is not implemented for `impl Sync` |
| help: consider further restricting this bound with `+ std::marker::Send` |
| --> $DIR/restrict-type-argument.rs:3:23 |
| | |
| LL | fn use_impl_sync(val: impl Sync) { |
| | ^^^^^^^^^ |
| |
| error[E0277]: `S` cannot be sent between threads safely |
| --> $DIR/restrict-type-argument.rs:8:13 |
| | |
| LL | fn is_send<T: Send>(val: T) {} |
| | ------- ---- required by this bound in `is_send` |
| ... |
| LL | is_send(val); |
| | ^^^ `S` cannot be sent between threads safely |
| | |
| = help: the trait `std::marker::Send` is not implemented for `S` |
| help: consider further restricting this bound with `+ std::marker::Send` |
| --> $DIR/restrict-type-argument.rs:7:31 |
| | |
| LL | fn use_where<S>(val: S) where S: Sync { |
| | ^^^^^^^ |
| |
| error[E0277]: `S` cannot be sent between threads safely |
| --> $DIR/restrict-type-argument.rs:12:13 |
| | |
| LL | fn is_send<T: Send>(val: T) {} |
| | ------- ---- required by this bound in `is_send` |
| ... |
| LL | is_send(val); |
| | ^^^ `S` cannot be sent between threads safely |
| | |
| = help: the trait `std::marker::Send` is not implemented for `S` |
| help: consider further restricting this bound with `+ std::marker::Send` |
| --> $DIR/restrict-type-argument.rs:11:17 |
| | |
| LL | fn use_bound<S: Sync>(val: S) { |
| | ^^^^ |
| |
| error[E0277]: `S` cannot be sent between threads safely |
| --> $DIR/restrict-type-argument.rs:20:13 |
| | |
| LL | fn is_send<T: Send>(val: T) {} |
| | ------- ---- required by this bound in `is_send` |
| ... |
| LL | is_send(val); |
| | ^^^ `S` cannot be sent between threads safely |
| | |
| = help: the trait `std::marker::Send` is not implemented for `S` |
| help: consider further restricting this bound with `+ std::marker::Send` |
| --> $DIR/restrict-type-argument.rs:18:5 |
| | |
| LL | Sync |
| | ^^^^ |
| |
| error[E0277]: `S` cannot be sent between threads safely |
| --> $DIR/restrict-type-argument.rs:24:13 |
| | |
| LL | fn is_send<T: Send>(val: T) {} |
| | ------- ---- required by this bound in `is_send` |
| ... |
| LL | is_send(val); |
| | ^^^ `S` cannot be sent between threads safely |
| | |
| = help: the trait `std::marker::Send` is not implemented for `S` |
| help: consider further restricting this bound with `+ std::marker::Send` |
| --> $DIR/restrict-type-argument.rs:23:47 |
| | |
| LL | fn use_bound_and_where<S: Sync>(val: S) where S: std::fmt::Debug { |
| | ^^^^^^^^^^^^^^^^^^ |
| |
| error[E0277]: `S` cannot be sent between threads safely |
| --> $DIR/restrict-type-argument.rs:28:13 |
| | |
| LL | fn is_send<T: Send>(val: T) {} |
| | ------- ---- required by this bound in `is_send` |
| ... |
| LL | is_send(val); |
| | ^^^ `S` cannot be sent between threads safely |
| | |
| = help: the trait `std::marker::Send` is not implemented for `S` |
| help: consider restricting this type parameter with `S: std::marker::Send` |
| --> $DIR/restrict-type-argument.rs:27:16 |
| | |
| LL | fn use_unbound<S>(val: S) { |
| | ^ |
| |
| error: aborting due to 6 previous errors |
| |
| For more information about this error, try `rustc --explain E0277`. |