]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/restrict-type-argument.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / suggestions / restrict-type-argument.stderr
1 error[E0277]: `impl Sync` cannot be sent between threads safely
2 --> $DIR/restrict-type-argument.rs:4:13
3 |
4 LL | fn is_send<T: Send>(val: T) {}
5 | ---- required by this bound in `is_send`
6 ...
7 LL | is_send(val);
8 | ^^^ `impl Sync` cannot be sent between threads safely
9 |
10 = help: the trait `std::marker::Send` is not implemented for `impl Sync`
11 help: consider further restricting this bound
12 |
13 LL | fn use_impl_sync(val: impl Sync + std::marker::Send) {
14 | ^^^^^^^^^^^^^^^^^^^
15
16 error[E0277]: `S` cannot be sent between threads safely
17 --> $DIR/restrict-type-argument.rs:8:13
18 |
19 LL | fn is_send<T: Send>(val: T) {}
20 | ---- required by this bound in `is_send`
21 ...
22 LL | is_send(val);
23 | ^^^ `S` cannot be sent between threads safely
24 |
25 = help: the trait `std::marker::Send` is not implemented for `S`
26 help: consider further restricting this bound
27 |
28 LL | fn use_where<S>(val: S) where S: Sync + std::marker::Send {
29 | ^^^^^^^^^^^^^^^^^^^
30
31 error[E0277]: `S` cannot be sent between threads safely
32 --> $DIR/restrict-type-argument.rs:12:13
33 |
34 LL | fn is_send<T: Send>(val: T) {}
35 | ---- required by this bound in `is_send`
36 ...
37 LL | is_send(val);
38 | ^^^ `S` cannot be sent between threads safely
39 |
40 = help: the trait `std::marker::Send` is not implemented for `S`
41 help: consider further restricting this bound
42 |
43 LL | fn use_bound<S: Sync + std::marker::Send>(val: S) {
44 | ^^^^^^^^^^^^^^^^^^^
45
46 error[E0277]: `S` cannot be sent between threads safely
47 --> $DIR/restrict-type-argument.rs:20:13
48 |
49 LL | fn is_send<T: Send>(val: T) {}
50 | ---- required by this bound in `is_send`
51 ...
52 LL | is_send(val);
53 | ^^^ `S` cannot be sent between threads safely
54 |
55 = help: the trait `std::marker::Send` is not implemented for `S`
56 help: consider further restricting this bound
57 |
58 LL | Sync + std::marker::Send
59 | ^^^^^^^^^^^^^^^^^^^
60
61 error[E0277]: `S` cannot be sent between threads safely
62 --> $DIR/restrict-type-argument.rs:24:13
63 |
64 LL | fn is_send<T: Send>(val: T) {}
65 | ---- required by this bound in `is_send`
66 ...
67 LL | is_send(val);
68 | ^^^ `S` cannot be sent between threads safely
69 |
70 = help: the trait `std::marker::Send` is not implemented for `S`
71 help: consider further restricting this bound
72 |
73 LL | fn use_bound_and_where<S: Sync>(val: S) where S: std::fmt::Debug + std::marker::Send {
74 | ^^^^^^^^^^^^^^^^^^^
75
76 error[E0277]: `S` cannot be sent between threads safely
77 --> $DIR/restrict-type-argument.rs:28:13
78 |
79 LL | fn is_send<T: Send>(val: T) {}
80 | ---- required by this bound in `is_send`
81 ...
82 LL | is_send(val);
83 | ^^^ `S` cannot be sent between threads safely
84 |
85 = help: the trait `std::marker::Send` is not implemented for `S`
86 help: consider restricting type parameter `S`
87 |
88 LL | fn use_unbound<S: std::marker::Send>(val: S) {
89 | ^^^^^^^^^^^^^^^^^^^
90
91 error: aborting due to 6 previous errors
92
93 For more information about this error, try `rustc --explain E0277`.