You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/ui/binding/issue-53114-safety-checks.stderr
+6-6
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
-
warning: reference to packed field is unaligned
1
+
error: reference to packed field is unaligned
2
2
--> $DIR/issue-53114-safety-checks.rs:23:13
3
3
|
4
4
LL | let _ = &p.b;
5
5
| ^^^^
6
6
|
7
-
= note: `#[warn(unaligned_references)]` on by default
7
+
= note: `#[deny(unaligned_references)]` on by default
8
8
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9
9
= note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
10
10
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
11
11
= 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)
12
12
13
-
warning: reference to packed field is unaligned
13
+
error: reference to packed field is unaligned
14
14
--> $DIR/issue-53114-safety-checks.rs:29:17
15
15
|
16
16
LL | let (_,) = (&p.b,);
@@ -21,7 +21,7 @@ LL | let (_,) = (&p.b,);
21
21
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
22
22
= 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)
23
23
24
-
warning: reference to packed field is unaligned
24
+
error: reference to packed field is unaligned
25
25
--> $DIR/issue-53114-safety-checks.rs:39:11
26
26
|
27
27
LL | match &p.b { _ => { } }
@@ -32,7 +32,7 @@ LL | match &p.b { _ => { } }
32
32
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
33
33
= 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)
= note: `#[warn(unaligned_references)]` on by default
7
+
= note: `#[deny(unaligned_references)]` on by default
8
8
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9
9
= note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
10
10
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
11
11
= 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)
12
-
= note: this warning originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
12
+
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: src/test/ui/packed/issue-27060.stderr
+5-9
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,17 @@
1
1
error: reference to packed field is unaligned
2
-
--> $DIR/issue-27060.rs:16:13
2
+
--> $DIR/issue-27060.rs:15:13
3
3
|
4
4
LL | let _ = &good.data;
5
5
| ^^^^^^^^^^
6
6
|
7
-
note: the lint level is defined here
8
-
--> $DIR/issue-27060.rs:8:8
9
-
|
10
-
LL | #[deny(unaligned_references)]
11
-
| ^^^^^^^^^^^^^^^^^^^^
7
+
= note: `#[deny(unaligned_references)]` on by default
12
8
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13
9
= note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
14
10
= 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
11
= 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)
16
12
17
13
error: reference to packed field is unaligned
18
-
--> $DIR/issue-27060.rs:18:13
14
+
--> $DIR/issue-27060.rs:17:13
19
15
|
20
16
LL | let _ = &good.data2[0];
21
17
| ^^^^^^^^^^^^^^
@@ -26,7 +22,7 @@ LL | let _ = &good.data2[0];
26
22
= 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)
27
23
28
24
error: reference to packed field is unaligned
29
-
--> $DIR/issue-27060.rs:21:13
25
+
--> $DIR/issue-27060.rs:20:13
30
26
|
31
27
LL | let _ = &good.data;
32
28
| ^^^^^^^^^^
@@ -37,7 +33,7 @@ LL | let _ = &good.data;
37
33
= 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)
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9
13
= note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
10
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)
Copy file name to clipboardExpand all lines: src/test/ui/packed/packed-struct-borrow-element.stderr
+7-3
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,21 @@
1
1
warning: reference to packed field is unaligned
2
-
--> $DIR/packed-struct-borrow-element.rs:25:15
2
+
--> $DIR/packed-struct-borrow-element.rs:26:15
3
3
|
4
4
LL | let brw = &foo.baz;
5
5
| ^^^^^^^^
6
6
|
7
-
= note: `#[warn(unaligned_references)]` on by default
7
+
note: the lint level is defined here
8
+
--> $DIR/packed-struct-borrow-element.rs:23:8
9
+
|
10
+
LL | #[warn(unaligned_references)]
11
+
| ^^^^^^^^^^^^^^^^^^^^
8
12
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9
13
= note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
10
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)
11
15
= 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)
0 commit comments