]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/min_const_generics/invalid-patterns.64bit.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / const-generics / min_const_generics / invalid-patterns.64bit.stderr
1 error[E0308]: mismatched types
2 --> $DIR/invalid-patterns.rs:29:21
3 |
4 LL | get_flag::<false, 0xFF>();
5 | ^^^^ expected `char`, found `u8`
6
7 error[E0308]: mismatched types
8 --> $DIR/invalid-patterns.rs:31:14
9 |
10 LL | get_flag::<7, 'c'>();
11 | ^ expected `bool`, found integer
12
13 error[E0308]: mismatched types
14 --> $DIR/invalid-patterns.rs:33:14
15 |
16 LL | get_flag::<42, 0x5ad>();
17 | ^^ expected `bool`, found integer
18
19 error[E0308]: mismatched types
20 --> $DIR/invalid-patterns.rs:33:18
21 |
22 LL | get_flag::<42, 0x5ad>();
23 | ^^^^^ expected `char`, found `u8`
24
25 error[E0080]: it is undefined behavior to use this value
26 --> $DIR/invalid-patterns.rs:38:21
27 |
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`)
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
36 error[E0080]: it is undefined behavior to use this value
37 --> $DIR/invalid-patterns.rs:40:14
38 |
39 LL | get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>();
40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: 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
47 error[E0080]: it is undefined behavior to use this value
48 --> $DIR/invalid-patterns.rs:42:14
49 |
50 LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: 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
58 error[E0080]: it is undefined behavior to use this value
59 --> $DIR/invalid-patterns.rs:42:47
60 |
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`)
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
69 error: aborting due to 8 previous errors
70
71 Some errors have detailed explanations: E0080, E0308.
72 For more information about an error, try `rustc --explain E0080`.