fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.7 KiB62 linesraw
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]: evaluation of constant value failed
26  --> $DIR/invalid-patterns.rs:38:32
27   |
28LL |   get_flag::<false, { unsafe { char_raw.character } }>();
29   |                                ^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
30
31error[E0080]: it is undefined behavior to use this value
32  --> $DIR/invalid-patterns.rs:41:14
33   |
34LL |   get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>();
35   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
36   |
37   = 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.
38   = note: the raw bytes of the constant (size: 1, align: 1) {
39               42                                              │ B
40           }
41
42error[E0080]: it is undefined behavior to use this value
43  --> $DIR/invalid-patterns.rs:43:14
44   |
45LL |   get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
46   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
47   |
48   = 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.
49   = note: the raw bytes of the constant (size: 1, align: 1) {
50               42                                              │ B
51           }
52
53error[E0080]: evaluation of constant value failed
54  --> $DIR/invalid-patterns.rs:43:58
55   |
56LL |   get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
57   |                                                          ^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
58
59error: aborting due to 8 previous errors
60
61Some errors have detailed explanations: E0080, E0308.
62For more information about an error, try `rustc --explain E0080`.