fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0793]: reference to packed field is unaligned 2 --> $DIR/unaligned_references.rs:25:13 3 | 4LL | &self.x; 5 | ^^^^^^^ 6 | 7 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 8 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 9 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 10 11error[E0793]: reference to packed field is unaligned 12 --> $DIR/unaligned_references.rs:34:17 13 | 14LL | let _ = &good.ptr; 15 | ^^^^^^^^^ 16 | 17 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 18 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 19 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 20 21error[E0793]: reference to packed field is unaligned 22 --> $DIR/unaligned_references.rs:35:17 23 | 24LL | let _ = &good.data; 25 | ^^^^^^^^^^ 26 | 27 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 28 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 29 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 30 31error[E0793]: reference to packed field is unaligned 32 --> $DIR/unaligned_references.rs:37:17 33 | 34LL | let _ = &good.data as *const _; 35 | ^^^^^^^^^^ 36 | 37 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 38 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 39 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 40 41error[E0793]: reference to packed field is unaligned 42 --> $DIR/unaligned_references.rs:38:27 43 | 44LL | let _: *const _ = &good.data; 45 | ^^^^^^^^^^ 46 | 47 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 48 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 49 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 50 51error[E0793]: reference to packed field is unaligned 52 --> $DIR/unaligned_references.rs:40:17 53 | 54LL | let _ = good.data.clone(); 55 | ^^^^^^^^^ 56 | 57 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 58 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 59 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 60 61error[E0793]: reference to packed field is unaligned 62 --> $DIR/unaligned_references.rs:42:17 63 | 64LL | let _ = &good.data2[0]; 65 | ^^^^^^^^^^^^^^ 66 | 67 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 68 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 69 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 70 71error[E0793]: reference to packed field is unaligned 72 --> $DIR/unaligned_references.rs:51:17 73 | 74LL | let _ = &packed2.x; 75 | ^^^^^^^^^^ 76 | 77 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 78 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 79 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 80 81error[E0793]: reference to packed field is unaligned 82 --> $DIR/unaligned_references.rs:90:20 83 | 84LL | let _ref = &m1.1.a; 85 | ^^^^^^^ 86 | 87 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 88 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 89 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 90 91error[E0793]: reference to packed field is unaligned 92 --> $DIR/unaligned_references.rs:93:20 93 | 94LL | let _ref = &m2.1.a; 95 | ^^^^^^^ 96 | 97 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses 98 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) 99 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) 100 101error: aborting due to 10 previous errors 102 103For more information about this error, try `rustc --explain E0793`.