move some validity-related tests into subdir

This commit is contained in:
Ralf Jung 2023-11-30 13:11:17 +01:00
parent 64fb96f17e
commit a0c8b09cf8
8 changed files with 8 additions and 8 deletions

View file

@ -1,5 +1,5 @@
error: Undefined Behavior: interpreting an invalid 8-bit value as a bool: 0x02
--> $DIR/invalid_bool.rs:LL:CC
--> $DIR/invalid_bool_op.rs:LL:CC
|
LL | let _x = b == std::hint::black_box(true);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ interpreting an invalid 8-bit value as a bool: 0x02
@ -7,7 +7,7 @@ LL | let _x = b == std::hint::black_box(true);
= 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: BACKTRACE:
= note: inside `main` at $DIR/invalid_bool.rs:LL:CC
= note: inside `main` at $DIR/invalid_bool_op.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View file

@ -1,5 +1,5 @@
error: Undefined Behavior: interpreting an invalid 32-bit value as a char: $HEX
--> $DIR/invalid_char.rs:LL:CC
--> $DIR/invalid_char_op.rs:LL:CC
|
LL | let _x = c == 'x';
| ^^^^^^^^ interpreting an invalid 32-bit value as a char: $HEX
@ -7,7 +7,7 @@ LL | let _x = c == 'x';
= 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: BACKTRACE:
= note: inside `main` at $DIR/invalid_char.rs:LL:CC
= note: inside `main` at $DIR/invalid_char_op.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View file

@ -1,5 +1,5 @@
error: Undefined Behavior: enum value has invalid tag: $HEX
--> $DIR/invalid_enum_tag.rs:LL:CC
--> $DIR/invalid_enum_op.rs:LL:CC
|
LL | let _val = mem::discriminant(&f);
| ^^^^^^^^^^^^^^^^^^^^^ enum value has invalid tag: $HEX
@ -7,7 +7,7 @@ LL | let _val = mem::discriminant(&f);
= 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: BACKTRACE:
= note: inside `main` at $DIR/invalid_enum_tag.rs:LL:CC
= note: inside `main` at $DIR/invalid_enum_op.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View file

@ -1,5 +1,5 @@
error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory
--> $DIR/invalid_int.rs:LL:CC
--> $DIR/invalid_int_op.rs:LL:CC
|
LL | let i = unsafe { std::mem::MaybeUninit::<i32>::uninit().assume_init() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
@ -7,7 +7,7 @@ LL | let i = unsafe { std::mem::MaybeUninit::<i32>::uninit().assume_init() }
= 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: BACKTRACE:
= note: inside `main` at $DIR/invalid_int.rs:LL:CC
= note: inside `main` at $DIR/invalid_int_op.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace