fork/rust

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

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

master
3.6 KiB75 linesraw
1warning: byte slice in a packed struct that derives a built-in trait
2  --> $DIR/deriving-with-repr-packed.rs:31:5
3   |
4LL | #[derive(Debug)]
5   |          ----- in this derive macro expansion
6...
7LL |     data: [u8],
8   |     ^^^^^^^^^^
9   |
10   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
11   = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
12   = help: consider implementing the trait by hand, or remove the `packed` attribute
13   = note: `#[warn(byte_slice_in_packed_struct_with_derive)]` on by default
14   = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
15
16warning: string slice in a packed struct that derives a built-in trait
17  --> $DIR/deriving-with-repr-packed.rs:41:5
18   |
19LL | #[derive(Debug)]
20   |          ----- in this derive macro expansion
21...
22LL |     data: str,
23   |     ^^^^^^^^^
24   |
25   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
26   = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
27   = help: consider implementing the trait by hand, or remove the `packed` attribute
28   = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
29
30error[E0507]: cannot move out of `self` which is behind a shared reference
31  --> $DIR/deriving-with-repr-packed.rs:22:10
32   |
33LL | #[derive(Debug, Default)]
34   |          ----- in this derive macro expansion
35LL | #[repr(packed)]
36LL | struct X(Y);
37   |          ^ move occurs because `self.0` has type `Y`, which does not implement the `Copy` trait
38   |
39   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
40
41error: aborting due to previous error; 2 warnings emitted
42
43For more information about this error, try `rustc --explain E0507`.
44Future incompatibility report: Future breakage diagnostic:
45warning: byte slice in a packed struct that derives a built-in trait
46  --> $DIR/deriving-with-repr-packed.rs:31:5
47   |
48LL | #[derive(Debug)]
49   |          ----- in this derive macro expansion
50...
51LL |     data: [u8],
52   |     ^^^^^^^^^^
53   |
54   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
55   = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
56   = help: consider implementing the trait by hand, or remove the `packed` attribute
57   = note: `#[warn(byte_slice_in_packed_struct_with_derive)]` on by default
58   = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
59
60Future breakage diagnostic:
61warning: string slice in a packed struct that derives a built-in trait
62  --> $DIR/deriving-with-repr-packed.rs:41:5
63   |
64LL | #[derive(Debug)]
65   |          ----- in this derive macro expansion
66...
67LL |     data: str,
68   |     ^^^^^^^^^
69   |
70   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
71   = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
72   = help: consider implementing the trait by hand, or remove the `packed` attribute
73   = note: `#[warn(byte_slice_in_packed_struct_with_derive)]` on by default
74   = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
75