1error[E0308]: mismatched types 2 --> $DIR/invalid-patterns.rs:29:21 3 | 4LL | get_flag::<false, 0xFF>(); 5 | ^^^^ expected `char`, found `u8` 6 7error[E0308]: mismatched types 8 --> $DIR/invalid-patterns.rs:31:14 9 | 10LL | get_flag::<7, 'c'>(); 11 | ^ expected `bool`, found integer 12 13error[E0308]: mismatched types 14 --> $DIR/invalid-patterns.rs:33:14 15 | 16LL | get_flag::<42, 0x5ad>(); 17 | ^^ expected `bool`, found integer 18 19error[E0308]: mismatched types 20 --> $DIR/invalid-patterns.rs:33:18 21 | 22LL | get_flag::<42, 0x5ad>(); 23 | ^^^^^ expected `char`, found `u8` 24 25error[E0080]: it is undefined behavior to use this value 26 --> $DIR/invalid-patterns.rs:38:21 27 | 28LL | get_flag::<false, { unsafe { char_raw.character } }>(); 29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`) 30 | 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) { 33 __ __ __ __ │ ░░░░ 34 } 35 36error[E0080]: it is undefined behavior to use this value 37 --> $DIR/invalid-patterns.rs:40:14 38 | 39LL | get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>(); 40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered 0x42, but expected a boolean 41 | 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) { 44 42 │ B 45 } 46 47error[E0080]: it is undefined behavior to use this value 48 --> $DIR/invalid-patterns.rs:42:14 49 | 50LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>(); 51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered 0x42, but expected a boolean 52 | 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) { 55 42 │ B 56 } 57 58error[E0080]: it is undefined behavior to use this value 59 --> $DIR/invalid-patterns.rs:42:47 60 | 61LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>(); 62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`) 63 | 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) { 66 __ __ __ __ │ ░░░░ 67 } 68 69error: aborting due to 8 previous errors 70 71Some errors have detailed explanations: E0080, E0308. 72For more information about an error, try `rustc --explain E0080`. 73