summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr
blob: 41fc3600fcd54e295148bce95c0602fa20068f81 (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
error[E0277]: `dummy::TestType` cannot be sent between threads safely
  --> $DIR/negated-auto-traits-error.rs:23:11
   |
LL |     Outer(TestType);
   |     ----- ^^^^^^^^ `dummy::TestType` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
   = help: the trait `Send` is not implemented for `dummy::TestType`
note: required by a bound in `Outer`
  --> $DIR/negated-auto-traits-error.rs:10:17
   |
LL | struct Outer<T: Send>(T);
   |                 ^^^^ required by this bound in `Outer`

error[E0277]: `dummy::TestType` cannot be sent between threads safely
  --> $DIR/negated-auto-traits-error.rs:23:5
   |
LL |     Outer(TestType);
   |     ^^^^^^^^^^^^^^^ `dummy::TestType` cannot be sent between threads safely
   |
   = help: the trait `Send` is not implemented for `dummy::TestType`
note: required by a bound in `Outer`
  --> $DIR/negated-auto-traits-error.rs:10:17
   |
LL | struct Outer<T: Send>(T);
   |                 ^^^^ required by this bound in `Outer`

error[E0277]: `dummy1b::TestType` cannot be sent between threads safely
  --> $DIR/negated-auto-traits-error.rs:32:13
   |
LL |     is_send(TestType);
   |     ------- ^^^^^^^^ `dummy1b::TestType` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
   = help: the trait `Send` is not implemented for `dummy1b::TestType`
note: required by a bound in `is_send`
  --> $DIR/negated-auto-traits-error.rs:16:15
   |
LL | fn is_send<T: Send>(_: T) {}
   |               ^^^^ required by this bound in `is_send`

error[E0277]: `dummy1c::TestType` cannot be sent between threads safely
  --> $DIR/negated-auto-traits-error.rs:40:13
   |
LL |     is_send((8, TestType));
   |     ------- ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
   = help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType`
   = note: required because it appears within the type `({integer}, dummy1c::TestType)`
note: required by a bound in `is_send`
  --> $DIR/negated-auto-traits-error.rs:16:15
   |
LL | fn is_send<T: Send>(_: T) {}
   |               ^^^^ required by this bound in `is_send`

error[E0277]: `dummy2::TestType` cannot be sent between threads safely
  --> $DIR/negated-auto-traits-error.rs:48:13
   |
LL |     is_send(Box::new(TestType));
   |     ------- ^^^^^^^^^^^^^^^^^^ the trait `Send` is not implemented for `Unique<dummy2::TestType>`
   |     |
   |     required by a bound introduced by this call
   |
   = note: the trait bound `Unique<dummy2::TestType>: Send` is not satisfied
   = note: required for `Unique<dummy2::TestType>` to implement `Send`
   = note: required because it appears within the type `Box<dummy2::TestType>`
note: required by a bound in `is_send`
  --> $DIR/negated-auto-traits-error.rs:16:15
   |
LL | fn is_send<T: Send>(_: T) {}
   |               ^^^^ required by this bound in `is_send`
help: consider borrowing here
   |
LL |     is_send(&Box::new(TestType));
   |             +

error[E0277]: `dummy3::TestType` cannot be sent between threads safely
  --> $DIR/negated-auto-traits-error.rs:56:13
   |
LL |     is_send(Box::new(Outer2(TestType)));
   |     ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
   = help: within `Outer2<dummy3::TestType>`, the trait `Send` is not implemented for `dummy3::TestType`
note: required because it appears within the type `Outer2<dummy3::TestType>`
  --> $DIR/negated-auto-traits-error.rs:12:8
   |
LL | struct Outer2<T>(T);
   |        ^^^^^^
   = note: required for `Unique<Outer2<dummy3::TestType>>` to implement `Send`
   = note: required because it appears within the type `Box<Outer2<dummy3::TestType>>`
note: required by a bound in `is_send`
  --> $DIR/negated-auto-traits-error.rs:16:15
   |
LL | fn is_send<T: Send>(_: T) {}
   |               ^^^^ required by this bound in `is_send`

error[E0277]: `main::TestType` cannot be sent between threads safely
  --> $DIR/negated-auto-traits-error.rs:66:13
   |
LL |     is_sync(Outer2(TestType));
   |     ------- ^^^^^^^^^^^^^^^^ `main::TestType` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
   |
   = help: the trait `Send` is not implemented for `main::TestType`
note: required for `Outer2<main::TestType>` to implement `Sync`
  --> $DIR/negated-auto-traits-error.rs:14:22
   |
LL | unsafe impl<T: Send> Sync for Outer2<T> {}
   |                      ^^^^     ^^^^^^^^^
note: required by a bound in `is_sync`
  --> $DIR/negated-auto-traits-error.rs:17:15
   |
LL | fn is_sync<T: Sync>(_: T) {}
   |               ^^^^ required by this bound in `is_sync`

error: aborting due to 7 previous errors

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