|
1 | 1 | error[E0080]: it is undefined behavior to use this value
|
2 |
| - --> $DIR/cell.rs:6:1 |
| 2 | + --> $DIR/cell.rs:11:1 |
3 | 3 | |
|
4 | 4 | LL | static FOO: Wrap<*mut u32> = Wrap(Cell::new(42).as_ptr());
|
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: 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 |
| - = note: the raw bytes of the constant (size: 8, align: 8) { |
9 |
| - ╾ALLOC0╼ │ ╾──────╼ |
| 8 | + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { |
| 9 | + HEX_DUMP |
10 | 10 | }
|
11 | 11 |
|
12 | 12 | error[E0080]: it is undefined behavior to use this value
|
13 |
| - --> $DIR/cell.rs:8:1 |
| 13 | + --> $DIR/cell.rs:13:1 |
14 | 14 | |
|
15 | 15 | LL | const FOO_CONST: Wrap<*mut u32> = Wrap(Cell::new(42).as_ptr());
|
16 | 16 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: 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 |
| - = note: the raw bytes of the constant (size: 8, align: 8) { |
20 |
| - ╾ALLOC1╼ │ ╾──────╼ |
| 19 | + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { |
| 20 | + HEX_DUMP |
21 | 21 | }
|
22 | 22 |
|
23 | 23 | error[E0080]: it is undefined behavior to use this value
|
24 |
| - --> $DIR/cell.rs:22:1 |
| 24 | + --> $DIR/cell.rs:27:1 |
25 | 25 | |
|
26 | 26 | LL | const FOO4_CONST: Wrap<*mut u32> = Wrap(FOO3_CONST.0.as_ptr());
|
27 | 27 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: 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 |
| - = note: the raw bytes of the constant (size: 8, align: 8) { |
31 |
| - ╾ALLOC2╼ │ ╾──────╼ |
| 30 | + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { |
| 31 | + HEX_DUMP |
32 | 32 | }
|
33 | 33 |
|
34 | 34 | error[E0080]: it is undefined behavior to use this value
|
35 |
| - --> $DIR/cell.rs:27:1 |
| 35 | + --> $DIR/cell.rs:32:1 |
36 | 36 | |
|
37 | 37 | LL | const FOO2: *mut u32 = Cell::new(42).as_ptr();
|
38 | 38 | | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: 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 |
| - = note: the raw bytes of the constant (size: 8, align: 8) { |
42 |
| - ╾ALLOC3╼ │ ╾──────╼ |
| 41 | + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { |
| 42 | + HEX_DUMP |
43 | 43 | }
|
44 | 44 |
|
45 | 45 | error: aborting due to 4 previous errors
|
|
0 commit comments