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: tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,24 @@
1
1
error[E0080]: it is undefined behavior to use this value
2
-
--> $DIR/mut_ref_in_final_dynamic_check.rs:15:1
2
+
--> $DIR/mut_ref_in_final_dynamic_check.rs:16:1
3
3
|
4
4
LL | const A: Option<&mut i32> = helper();
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const` or `static`
6
6
|
7
7
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
8
8
= note: the raw bytes of the constant (size: 4, align: 4) {
9
-
2a 00 00 00 │ *...
9
+
╾ALLOC0╼ │ ╾──╼
10
10
}
11
11
12
-
error: encountered dangling pointer in final value of constant
13
-
--> $DIR/mut_ref_in_final_dynamic_check.rs:22:1
12
+
error[E0080]: it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const` or `static`
14
17
|
15
-
LL | const B: Option<&mut i32> = helper2();
16
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
18
+
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
19
+
= note: the raw bytes of the constant (size: 4, align: 4) {
Copy file name to clipboardExpand all lines: tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,24 @@
1
1
error[E0080]: it is undefined behavior to use this value
2
-
--> $DIR/mut_ref_in_final_dynamic_check.rs:15:1
2
+
--> $DIR/mut_ref_in_final_dynamic_check.rs:16:1
3
3
|
4
4
LL | const A: Option<&mut i32> = helper();
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const` or `static`
6
6
|
7
7
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
8
8
= note: the raw bytes of the constant (size: 8, align: 8) {
9
-
2a 00 00 00 00 00 00 00 │ *.......
9
+
╾ALLOC0╼ │ ╾──────╼
10
10
}
11
11
12
-
error: encountered dangling pointer in final value of constant
13
-
--> $DIR/mut_ref_in_final_dynamic_check.rs:22:1
12
+
error[E0080]: it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const` or `static`
14
17
|
15
-
LL | const B: Option<&mut i32> = helper2();
16
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
18
+
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
19
+
= note: the raw bytes of the constant (size: 8, align: 8) {
0 commit comments