Skip to content

Commit f40d3d0

Browse files
committed
Make ub_check message clear that it's not an assert
1 parent d0ba907 commit f40d3d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/fail/ptr_swap_nonoverlapping.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
33
unsafe precondition(s) violated: ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap
4+
5+
This indicates a bug in the program. This Undefined Behavior check is optional, and cannot be relied on for safety.
46
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
57
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
68
thread caused non-unwinding panic. aborting.

0 commit comments

Comments
 (0)