summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr
blob: 5f4630f6f4bc88ad606e43eb3a5c2e72e4a09891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
error: encountered dangling pointer in final constant
  --> $DIR/dealloc_intrinsic_dangling.rs:7:1
   |
LL | const _X: &'static u8 = unsafe {
   | ^^^^^^^^^^^^^^^^^^^^^

error[E0080]: evaluation of constant value failed
  --> $DIR/dealloc_intrinsic_dangling.rs:18:5
   |
LL |     *reference
   |     ^^^^^^^^^^ memory access failed: ALLOC0 has been freed, so this pointer is dangling

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0080`.