fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0793]: reference to packed field is unaligned 2 --> $DIR/issue-53114-safety-checks.rs:23:13 3 | 4LL | let _ = &p.b; 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/issue-53114-safety-checks.rs:28:17 13 | 14LL | let (_,) = (&p.b,); 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/issue-53114-safety-checks.rs:37:16 23 | 24LL | let _: _ = &p.b; 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/issue-53114-safety-checks.rs:42:20 33 | 34LL | let (_,): _ = (&p.b,); 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/issue-53114-safety-checks.rs:51:11 43 | 44LL | match &p.b { _ => { } } 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/issue-53114-safety-checks.rs:56:12 53 | 54LL | match (&p.b,) { (_,) => { } } 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[E0133]: access to union field is unsafe and requires unsafe function or block 62 --> $DIR/issue-53114-safety-checks.rs:24:13 63 | 64LL | let _ = u1.a; 65 | ^^^^ access to union field 66 | 67 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 68 69error[E0133]: access to union field is unsafe and requires unsafe function or block 70 --> $DIR/issue-53114-safety-checks.rs:25:13 71 | 72LL | let _ = &u2.a; 73 | ^^^^^ access to union field 74 | 75 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 76 77error[E0133]: access to union field is unsafe and requires unsafe function or block 78 --> $DIR/issue-53114-safety-checks.rs:29:17 79 | 80LL | let (_,) = (u1.a,); 81 | ^^^^ access to union field 82 | 83 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 84 85error[E0133]: access to union field is unsafe and requires unsafe function or block 86 --> $DIR/issue-53114-safety-checks.rs:30:17 87 | 88LL | let (_,) = (&u2.a,); 89 | ^^^^^ access to union field 90 | 91 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 92 93error[E0133]: access to union field is unsafe and requires unsafe function or block 94 --> $DIR/issue-53114-safety-checks.rs:38:16 95 | 96LL | let _: _ = u1.a; 97 | ^^^^ access to union field 98 | 99 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 100 101error[E0133]: access to union field is unsafe and requires unsafe function or block 102 --> $DIR/issue-53114-safety-checks.rs:39:16 103 | 104LL | let _: _ = &u2.a; 105 | ^^^^^ access to union field 106 | 107 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 108 109error[E0133]: access to union field is unsafe and requires unsafe function or block 110 --> $DIR/issue-53114-safety-checks.rs:43:20 111 | 112LL | let (_,): _ = (u1.a,); 113 | ^^^^ access to union field 114 | 115 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 116 117error[E0133]: access to union field is unsafe and requires unsafe function or block 118 --> $DIR/issue-53114-safety-checks.rs:44:20 119 | 120LL | let (_,): _ = (&u2.a,); 121 | ^^^^^ access to union field 122 | 123 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 124 125error[E0133]: access to union field is unsafe and requires unsafe function or block 126 --> $DIR/issue-53114-safety-checks.rs:52:11 127 | 128LL | match u1.a { _ => { } } 129 | ^^^^ access to union field 130 | 131 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 132 133error[E0133]: access to union field is unsafe and requires unsafe function or block 134 --> $DIR/issue-53114-safety-checks.rs:53:11 135 | 136LL | match &u2.a { _ => { } } 137 | ^^^^^ access to union field 138 | 139 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 140 141error[E0133]: access to union field is unsafe and requires unsafe function or block 142 --> $DIR/issue-53114-safety-checks.rs:57:12 143 | 144LL | match (u1.a,) { (_,) => { } } 145 | ^^^^ access to union field 146 | 147 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 148 149error[E0133]: access to union field is unsafe and requires unsafe function or block 150 --> $DIR/issue-53114-safety-checks.rs:58:12 151 | 152LL | match (&u2.a,) { (_,) => { } } 153 | ^^^^^ access to union field 154 | 155 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 156 157error: aborting due to 18 previous errors 158 159Some errors have detailed explanations: E0133, E0793. 160For more information about an error, try `rustc --explain E0133`.