2020-10-26 18:25:12 -05:00
error[E0308]: mismatched types
2021-03-31 03:09:16 -05:00
--> $DIR/invalid-patterns.rs:29:21
2020-10-26 18:25:12 -05:00
|
LL | get_flag::<false, 0xFF>();
| ^^^^ expected `char`, found `u8`
error[E0308]: mismatched types
2021-03-31 03:09:16 -05:00
--> $DIR/invalid-patterns.rs:31:14
2020-10-26 18:25:12 -05:00
|
LL | get_flag::<7, 'c'>();
| ^ expected `bool`, found integer
error[E0308]: mismatched types
2021-03-31 03:09:16 -05:00
--> $DIR/invalid-patterns.rs:33:14
2020-10-26 18:25:12 -05:00
|
LL | get_flag::<42, 0x5ad>();
| ^^ expected `bool`, found integer
error[E0308]: mismatched types
2021-03-31 03:09:16 -05:00
--> $DIR/invalid-patterns.rs:33:18
2020-10-26 18:25:12 -05:00
|
LL | get_flag::<42, 0x5ad>();
| ^^^^^ expected `char`, found `u8`
2022-08-01 18:05:20 -05:00
error[E0080]: evaluation of constant value failed
--> $DIR/invalid-patterns.rs:38:32
2020-10-26 18:25:12 -05:00
|
LL | get_flag::<false, { unsafe { char_raw.character } }>();
2022-08-01 18:05:20 -05:00
| ^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
2020-10-26 18:25:12 -05:00
error[E0080]: it is undefined behavior to use this value
2022-08-01 18:05:20 -05:00
--> $DIR/invalid-patterns.rs:41:14
2020-10-26 18:25:12 -05:00
|
LL | get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>();
2022-06-25 22:46:51 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
2020-10-26 18:25:12 -05: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 06:02:31 -06:00
= note: the raw bytes of the constant (size: 1, align: 1) {
42 │ B
}
2020-10-26 18:25:12 -05:00
error[E0080]: it is undefined behavior to use this value
2022-08-01 18:05:20 -05:00
--> $DIR/invalid-patterns.rs:43:14
2020-10-26 18:25:12 -05:00
|
LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
2022-06-25 22:46:51 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
2020-10-26 18:25:12 -05: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 06:02:31 -06:00
= note: the raw bytes of the constant (size: 1, align: 1) {
42 │ B
}
2020-10-26 18:25:12 -05:00
2022-08-01 18:05:20 -05:00
error[E0080]: evaluation of constant value failed
--> $DIR/invalid-patterns.rs:43:58
2020-10-26 18:25:12 -05:00
|
LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
2022-08-01 18:05:20 -05:00
| ^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
2020-10-26 18:25:12 -05: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`.