]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/unaligned_references.stderr
Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, r=GuillaumeGomez
[rust.git] / src / test / ui / lint / unaligned_references.stderr
1 error: reference to packed field is unaligned
2   --> $DIR/unaligned_references.rs:22:17
3    |
4 LL |         let _ = &good.ptr;
5    |                 ^^^^^^^^^
6    |
7 note: the lint level is defined here
8   --> $DIR/unaligned_references.rs:1:9
9    |
10 LL | #![deny(unaligned_references)]
11    |         ^^^^^^^^^^^^^^^^^^^^
12    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
14    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
15
16 error: reference to packed field is unaligned
17   --> $DIR/unaligned_references.rs:24:17
18    |
19 LL |         let _ = &good.data;
20    |                 ^^^^^^^^^^
21    |
22    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
24    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
25
26 error: reference to packed field is unaligned
27   --> $DIR/unaligned_references.rs:27:17
28    |
29 LL |         let _ = &good.data as *const _;
30    |                 ^^^^^^^^^^
31    |
32    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
33    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
34    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
35
36 error: reference to packed field is unaligned
37   --> $DIR/unaligned_references.rs:29:27
38    |
39 LL |         let _: *const _ = &good.data;
40    |                           ^^^^^^^^^^
41    |
42    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
43    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
44    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
45
46 error: reference to packed field is unaligned
47   --> $DIR/unaligned_references.rs:32:17
48    |
49 LL |         let _ = good.data.clone();
50    |                 ^^^^^^^^^
51    |
52    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
53    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
54    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
55
56 error: reference to packed field is unaligned
57   --> $DIR/unaligned_references.rs:35:17
58    |
59 LL |         let _ = &good.data2[0];
60    |                 ^^^^^^^^^^^^^^
61    |
62    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
63    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
64    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
65
66 error: reference to packed field is unaligned
67   --> $DIR/unaligned_references.rs:45:17
68    |
69 LL |         let _ = &packed2.x;
70    |                 ^^^^^^^^^^
71    |
72    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
73    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
74    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
75
76 error: aborting due to 7 previous errors
77