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
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered a dangling reference (use-after-free)
38
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (use-after-free)
39
39
|
40
40
= 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.
41
41
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
@@ -46,7 +46,7 @@ error[E0080]: it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered a dangling reference (use-after-free)
49
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (use-after-free)
50
50
|
51
51
= 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.
52
52
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
Copy file name to clipboardexpand all lines: tests/ui/consts/dangling_raw_ptr.stderr
+4-4
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/dangling_raw_ptr.rs:6:1
3
3
|
4
4
LL | const FOO: *const u32 = {
5
-
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (use-after-free)
5
+
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a dangling reference (use-after-free)
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: $SIZE, align: $ALIGN) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
13
13
--> $DIR/dangling_raw_ptr.rs:15:1
14
14
|
15
15
LL | const BAR: Union = {
16
-
| ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (use-after-free)
16
+
| ^^^^^^^^^^^^^^^^ constructing invalid value at .<offset(0)>.<deref>: encountered a dangling reference (use-after-free)
17
17
|
18
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
19
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
@@ -24,7 +24,7 @@ error[E0080]: it is undefined behavior to use this value
24
24
--> $DIR/dangling_raw_ptr.rs:20:1
25
25
|
26
26
LL | const BAZ: Union = {
27
-
| ^^^^^^^^^^^^^^^^ constructing invalid value at .<offset(0)>.<deref>: encountered a dangling reference (use-after-free)
27
+
| ^^^^^^^^^^^^^^^^ constructing invalid value at .<offset(0)>.<deref>.<offset(0)>.<deref>: encountered a dangling reference (use-after-free)
28
28
|
29
29
= 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.
30
30
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
@@ -35,7 +35,7 @@ error[E0080]: it is undefined behavior to use this value
35
35
--> $DIR/dangling_raw_ptr.rs:25:1
36
36
|
37
37
LL | const FOOMP: *const u32 = {
38
-
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<offset(0)>.<deref>: encountered a dangling reference (use-after-free)
38
+
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<offset(0)>.<deref>: encountered a dangling reference (use-after-free)
39
39
|
40
40
= 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.
41
41
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a dangling reference (use-after-free)
5
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0.<deref>: encountered a dangling reference (use-after-free)
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: $SIZE, align: $ALIGN) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a dangling reference (use-after-free)
16
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0.<deref>: encountered a dangling reference (use-after-free)
17
17
|
18
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
19
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
@@ -24,7 +24,7 @@ error[E0080]: it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a dangling reference (use-after-free)
27
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0.<deref>: encountered a dangling reference (use-after-free)
28
28
|
29
29
= 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.
30
30
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
@@ -35,7 +35,7 @@ error[E0080]: it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (use-after-free)
38
+
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a dangling reference (use-after-free)
39
39
|
40
40
= 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.
41
41
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
0 commit comments