blob: 08647f18fb42271313f7b88697b21c09004a2d43 [file]
error: Undefined Behavior: constructing invalid value of type (u32) is 1..: encountered 0, but expected something greater or equal to 1
--> tests/fail/validity/nonzero.rs:LL:CC
|
LL | let _x = Some(unsafe { NonZero(std::mem::transmute(0_u32)) });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
= 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
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
error: aborting due to 1 previous error