summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui-toml/strict_non_send_fields_in_send_ty/test.stderr
blob: c72f8c6488dbd186f64fb9a4481bd9e575358212 (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
error: some fields in `NoGeneric` are not safe to be sent to another thread
  --> $DIR/test.rs:11:1
   |
LL | unsafe impl Send for NoGeneric {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `rc_is_not_send` to another thread
  --> $DIR/test.rs:8:5
   |
LL |     rc_is_not_send: Rc<String>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: use a thread-safe type that implements `Send`
   = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings`

error: some fields in `MultiField<T>` are not safe to be sent to another thread
  --> $DIR/test.rs:19:1
   |
LL | unsafe impl<T> Send for MultiField<T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `field1` to another thread
  --> $DIR/test.rs:14:5
   |
LL |     field1: T,
   |     ^^^^^^^^^
   = help: add `T: Send` bound in `Send` impl
note: it is not safe to send field `field2` to another thread
  --> $DIR/test.rs:15:5
   |
LL |     field2: T,
   |     ^^^^^^^^^
   = help: add `T: Send` bound in `Send` impl
note: it is not safe to send field `field3` to another thread
  --> $DIR/test.rs:16:5
   |
LL |     field3: T,
   |     ^^^^^^^^^
   = help: add `T: Send` bound in `Send` impl

error: some fields in `MyOption<T>` are not safe to be sent to another thread
  --> $DIR/test.rs:26:1
   |
LL | unsafe impl<T> Send for MyOption<T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `0` to another thread
  --> $DIR/test.rs:22:12
   |
LL |     MySome(T),
   |            ^
   = help: add `T: Send` bound in `Send` impl

error: some fields in `HeuristicTest` are not safe to be sent to another thread
  --> $DIR/test.rs:41:1
   |
LL | unsafe impl Send for HeuristicTest {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: it is not safe to send field `field1` to another thread
  --> $DIR/test.rs:34:5
   |
LL |     field1: Vec<*const NonSend>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: use a thread-safe type that implements `Send`
note: it is not safe to send field `field2` to another thread
  --> $DIR/test.rs:35:5
   |
LL |     field2: [*const NonSend; 3],
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: use a thread-safe type that implements `Send`
note: it is not safe to send field `field3` to another thread
  --> $DIR/test.rs:36:5
   |
LL |     field3: (*const NonSend, *const NonSend, *const NonSend),
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: use a thread-safe type that implements `Send`
note: it is not safe to send field `field4` to another thread
  --> $DIR/test.rs:37:5
   |
LL |     field4: (*const NonSend, Rc<u8>),
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: use a thread-safe type that implements `Send`
note: it is not safe to send field `field5` to another thread
  --> $DIR/test.rs:38:5
   |
LL |     field5: Vec<Vec<*const NonSend>>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: use a thread-safe type that implements `Send`

error: aborting due to 4 previous errors