]> git.proxmox.com Git - rustc.git/blob - src/test/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / closures / 2229_closure_analysis / diagnostics / repr_packed.stderr
1 warning: the feature `capture_disjoint_fields` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/repr_packed.rs:3:12
3 |
4 LL | #![feature(capture_disjoint_fields)]
5 | ^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `#[warn(incomplete_features)]` on by default
8 = note: see issue #53488 <https://github.com/rust-lang/rust/issues/53488> for more information
9
10 warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133)
11 --> $DIR/repr_packed.rs:25:24
12 |
13 LL | println!("{}", foo.x);
14 | ^^^^^
15 |
16 = note: `#[warn(safe_packed_borrows)]` on by default
17 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18 = note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
19 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
20
21 warning: 2 warnings emitted
22