2025-06-18 12:51:47 +00:00
error[E0080]: reading memory at ALLOC0[0x0..0x4], but memory is uninitialized at [0x1..0x4], and this operation requires initialized memory
2025-04-05 19:19:56 +03:00
--> $DIR/invalid-patterns.rs:40:32
2020-10-26 23:25:12 +00:00
|
LL | get_flag::<false, { unsafe { char_raw.character } }>();
2025-06-07 11:32:09 +02:00
| ^^^^^^^^^^^^^^^^^^ evaluation of `main::{constant#7}` failed here
2025-06-18 12:51:47 +00:00
|
= note: the raw bytes of the constant (size: 4, align: 4) {
ff __ __ __ │ .░░░
}
2020-10-26 23:25:12 +00:00
2025-05-28 10:29:08 +00:00
error[E0080]: constructing invalid value: encountered 0x42, but expected a boolean
--> $DIR/invalid-patterns.rs:42:14
2020-10-26 23:25:12 +00:00
|
LL | get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>();
2025-05-28 10:29:08 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
2020-10-26 23:25:12 +00:00
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
2021-02-01 12:02:31 +00:00
= note: the raw bytes of the constant (size: 1, align: 1) {
42 │ B
}
2020-10-26 23:25:12 +00:00
2025-05-28 10:29:08 +00:00
error[E0080]: constructing invalid value: encountered 0x42, but expected a boolean
--> $DIR/invalid-patterns.rs:44:14
2020-10-26 23:25:12 +00:00
|
LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
2025-05-28 10:29:08 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
2020-10-26 23:25:12 +00:00
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
2021-02-01 12:02:31 +00:00
= note: the raw bytes of the constant (size: 1, align: 1) {
42 │ B
}
2020-10-26 23:25:12 +00:00
2025-06-18 12:51:47 +00:00
error[E0080]: reading memory at ALLOC1[0x0..0x4], but memory is uninitialized at [0x1..0x4], and this operation requires initialized memory
2025-05-28 10:29:08 +00:00
--> $DIR/invalid-patterns.rs:44:58
2020-10-26 23:25:12 +00:00
|
LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
2025-06-07 11:32:09 +02:00
| ^^^^^^^^^^^^^^^^^^ evaluation of `main::{constant#11}` failed here
2025-06-18 12:51:47 +00:00
|
= note: the raw bytes of the constant (size: 4, align: 4) {
ff __ __ __ │ .░░░
}
2020-10-26 23:25:12 +00:00
2025-01-07 12:33:32 +00:00
error[E0308]: mismatched types
2025-04-05 19:19:56 +03:00
--> $DIR/invalid-patterns.rs:31:21
2025-01-07 12:33:32 +00:00
|
LL | get_flag::<false, 0xFF>();
| ^^^^ expected `char`, found `u8`
error[E0308]: mismatched types
2025-04-05 19:19:56 +03:00
--> $DIR/invalid-patterns.rs:33:14
2025-01-07 12:33:32 +00:00
|
LL | get_flag::<7, 'c'>();
| ^ expected `bool`, found integer
error[E0308]: mismatched types
2025-04-05 19:19:56 +03:00
--> $DIR/invalid-patterns.rs:35:14
2025-01-07 12:33:32 +00:00
|
LL | get_flag::<42, 0x5ad>();
| ^^ expected `bool`, found integer
error[E0308]: mismatched types
2025-04-05 19:19:56 +03:00
--> $DIR/invalid-patterns.rs:35:18
2025-01-07 12:33:32 +00:00
|
LL | get_flag::<42, 0x5ad>();
| ^^^^^ expected `char`, found `u8`
2020-10-26 23:25:12 +00:00
error: aborting due to 8 previous errors
Some errors have detailed explanations: E0080, E0308.
For more information about an error, try `rustc --explain E0080`.