1 error[E0308]: mismatched types
2 --> $DIR/invalid-patterns.rs:29:21
4 LL | get_flag::<false, 0xFF>();
5 | ^^^^ expected `char`, found `u8`
7 error[E0308]: mismatched types
8 --> $DIR/invalid-patterns.rs:31:14
10 LL | get_flag::<7, 'c'>();
11 | ^ expected `bool`, found integer
13 error[E0308]: mismatched types
14 --> $DIR/invalid-patterns.rs:33:14
16 LL | get_flag::<42, 0x5ad>();
17 | ^^ expected `bool`, found integer
19 error[E0308]: mismatched types
20 --> $DIR/invalid-patterns.rs:33:18
22 LL | get_flag::<42, 0x5ad>();
23 | ^^^^^ expected `char`, found `u8`
25 error[E0080]: it is undefined behavior to use this value
26 --> $DIR/invalid-patterns.rs:38:21
28 LL | get_flag::<false, { unsafe { char_raw.character } }>();
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
31 = 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.
32 = note: the raw bytes of the constant (size: 4, align: 4) {
36 error[E0080]: it is undefined behavior to use this value
37 --> $DIR/invalid-patterns.rs:40:14
39 LL | get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>();
40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
42 = 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.
43 = note: the raw bytes of the constant (size: 1, align: 1) {
47 error[E0080]: it is undefined behavior to use this value
48 --> $DIR/invalid-patterns.rs:42:14
50 LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
53 = 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.
54 = note: the raw bytes of the constant (size: 1, align: 1) {
58 error[E0080]: it is undefined behavior to use this value
59 --> $DIR/invalid-patterns.rs:42:47
61 LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
64 = 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.
65 = note: the raw bytes of the constant (size: 4, align: 4) {
69 error: aborting due to 8 previous errors
71 Some errors have detailed explanations: E0080, E0308.
72 For more information about an error, try `rustc --explain E0080`.