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
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
2
2
--> $DIR/mut_ref_in_final_dynamic_check.rs:17:1
3
3
|
4
4
LL | const A: Option<&mut i32> = helper();
5
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const`
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) {
Copy file name to clipboardExpand all lines: tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
2
2
--> $DIR/mut_ref_in_final_dynamic_check.rs:17:1
3
3
|
4
4
LL | const A: Option<&mut i32> = helper();
5
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const`
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) {
Copy file name to clipboardExpand all lines: tests/ui/consts/invalid-union.32bit.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
2
2
--> $DIR/invalid-union.rs:41:1
3
3
|
4
4
LL | fn main() {
5
-
| ^^^^^^^^^ constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in a `const`
5
+
| ^^^^^^^^^ constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in read-only memory
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) {
0 commit comments