fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.4 KiB63 linesraw
1error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
2  --> $DIR/field_checks.rs:24:5
3   |
4LL |     a: String,
5   |     ^^^^^^^^^
6   |
7   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
8help: wrap the field type in `ManuallyDrop<...>`
9   |
10LL |     a: std::mem::ManuallyDrop<String>,
11   |        +++++++++++++++++++++++      +
12
13error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
14  --> $DIR/field_checks.rs:28:5
15   |
16LL |     a: std::cell::RefCell<i32>,
17   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
18   |
19   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
20help: wrap the field type in `ManuallyDrop<...>`
21   |
22LL |     a: std::mem::ManuallyDrop<std::cell::RefCell<i32>>,
23   |        +++++++++++++++++++++++                       +
24
25error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
26  --> $DIR/field_checks.rs:32:5
27   |
28LL |     a: T,
29   |     ^^^^
30   |
31   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
32help: wrap the field type in `ManuallyDrop<...>`
33   |
34LL |     a: std::mem::ManuallyDrop<T>,
35   |        +++++++++++++++++++++++ +
36
37error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
38  --> $DIR/field_checks.rs:44:5
39   |
40LL |     nest: U5,
41   |     ^^^^^^^^
42   |
43   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
44help: wrap the field type in `ManuallyDrop<...>`
45   |
46LL |     nest: std::mem::ManuallyDrop<U5>,
47   |           +++++++++++++++++++++++  +
48
49error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
50  --> $DIR/field_checks.rs:48:5
51   |
52LL |     nest: [U5; 0],
53   |     ^^^^^^^^^^^^^
54   |
55   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
56help: wrap the field type in `ManuallyDrop<...>`
57   |
58LL |     nest: std::mem::ManuallyDrop<[U5; 0]>,
59   |           +++++++++++++++++++++++       +
60
61error: aborting due to 5 previous errors
62
63For more information about this error, try `rustc --explain E0740`.