about summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
blob: 8dbb05c15725a2a6d2596528e07767531c2e78a7 (plain)
1
2
3
4
5
6
7
8
9
error[E0080]: memory access failed: attempting to access 1 byte, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
  --> $DIR/nonnull_as_ref_ub.rs:4:29
   |
LL | const _: () = assert!(42 == *unsafe { NON_NULL.as_ref() });
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_` failed here

error: aborting due to 1 previous error

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