summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/restrict-type-argument.stderr
blob: 01c2de7986419bed90a66cdce1f833ae9c503c4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
error[E0277]: `impl Sync` cannot be sent between threads safely
  --> $DIR/restrict-type-argument.rs:4:13
   |
LL |     is_send(val);
   |     ------- ^^^ `impl Sync` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `is_send`
  --> $DIR/restrict-type-argument.rs:1:15
   |
LL | fn is_send<T: Send>(val: T) {}
   |               ^^^^ required by this bound in `is_send`
help: consider further restricting this bound
   |
LL | fn use_impl_sync(val: impl Sync + std::marker::Send) {
   |                                 +++++++++++++++++++

error[E0277]: `S` cannot be sent between threads safely
  --> $DIR/restrict-type-argument.rs:8:13
   |
LL |     is_send(val);
   |     ------- ^^^ `S` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `is_send`
  --> $DIR/restrict-type-argument.rs:1:15
   |
LL | fn is_send<T: Send>(val: T) {}
   |               ^^^^ required by this bound in `is_send`
help: consider further restricting this bound
   |
LL | fn use_where<S>(val: S) where S: Sync + std::marker::Send {
   |                                       +++++++++++++++++++

error[E0277]: `S` cannot be sent between threads safely
  --> $DIR/restrict-type-argument.rs:12:13
   |
LL |     is_send(val);
   |     ------- ^^^ `S` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `is_send`
  --> $DIR/restrict-type-argument.rs:1:15
   |
LL | fn is_send<T: Send>(val: T) {}
   |               ^^^^ required by this bound in `is_send`
help: consider further restricting this bound
   |
LL | fn use_bound<S: Sync + std::marker::Send>(val: S) {
   |                      +++++++++++++++++++

error[E0277]: `S` cannot be sent between threads safely
  --> $DIR/restrict-type-argument.rs:20:13
   |
LL |     is_send(val);
   |     ------- ^^^ `S` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `is_send`
  --> $DIR/restrict-type-argument.rs:1:15
   |
LL | fn is_send<T: Send>(val: T) {}
   |               ^^^^ required by this bound in `is_send`
help: consider further restricting this bound
   |
LL |     Sync + std::marker::Send
   |          +++++++++++++++++++

error[E0277]: `S` cannot be sent between threads safely
  --> $DIR/restrict-type-argument.rs:24:13
   |
LL |     is_send(val);
   |     ------- ^^^ `S` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `is_send`
  --> $DIR/restrict-type-argument.rs:1:15
   |
LL | fn is_send<T: Send>(val: T) {}
   |               ^^^^ required by this bound in `is_send`
help: consider further restricting this bound
   |
LL | fn use_bound_and_where<S: Sync + std::marker::Send>(val: S) where S: std::fmt::Debug {
   |                                +++++++++++++++++++

error[E0277]: `S` cannot be sent between threads safely
  --> $DIR/restrict-type-argument.rs:28:13
   |
LL |     is_send(val);
   |     ------- ^^^ `S` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `is_send`
  --> $DIR/restrict-type-argument.rs:1:15
   |
LL | fn is_send<T: Send>(val: T) {}
   |               ^^^^ required by this bound in `is_send`
help: consider restricting type parameter `S`
   |
LL | fn use_unbound<S: std::marker::Send>(val: S) {
   |                 +++++++++++++++++++

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0277`.