]> git.lizzy.rs Git - rust.git/blobdiff - tests/fail/function_pointers/deref_fn_ptr.stderr
make use of get_alloc_info
[rust.git] / tests / fail / function_pointers / deref_fn_ptr.stderr
index 1e3da2726d4b89fbfa2e277586b88d4c77d97533..619b58f699a3281ae7e7726f93b4ce9a01186f1b 100644 (file)
@@ -1,8 +1,8 @@
-error: Undefined Behavior: accessing ALLOC which contains a function
+error: Undefined Behavior: dereferencing pointer failed: ALLOC has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
   --> $DIR/deref_fn_ptr.rs:LL:CC
    |
 LL |         *std::mem::transmute::<fn(), *const u8>(f)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing ALLOC which contains a function
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
    |
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information