]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/pass/stacked-borrows/issue-miri-2389.stderr
Add 'src/tools/miri/' from commit '75dd959a3a40eb5b4574f8d2e23aa6efbeb33573'
[rust.git] / src / tools / miri / tests / pass / stacked-borrows / issue-miri-2389.stderr
1 warning: integer-to-pointer cast
2   --> $DIR/issue-miri-2389.rs:LL:CC
3    |
4 LL |         let wildcard = &root0 as *const Cell<i32> as usize as *const Cell<i32>;
5    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
6    |
7    = help: This program is using integer-to-pointer casts or (equivalently) `ptr::from_exposed_addr`,
8    = help: which means that Miri might miss pointer bugs in this program.
9    = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html for more details on that operation.
10    = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.
11    = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `from_exposed_addr` semantics.
12    = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.
13    = note: BACKTRACE:
14    = note: inside `main` at $DIR/issue-miri-2389.rs:LL:CC
15