fork/rust

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

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

master
1.6 KiB45 linesraw
1error[E0573]: expected type, found variant `Mode::Cool`
2  --> $DIR/assoc_const_eq_diagnostic.rs:11:35
3   |
4LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
5   |                                   ^^^^^^^^^^
6   |                                   |
7   |                                   not a type
8   |                                   help: try using the variant's enum: `Mode`
9
10error[E0573]: expected type, found variant `Mode::Cool`
11  --> $DIR/assoc_const_eq_diagnostic.rs:16:17
12   |
13LL | fn no_help() -> Mode::Cool {}
14   |                 ^^^^^^^^^^
15   |                 |
16   |                 not a type
17   |                 help: try using the variant's enum: `Mode`
18
19error: expected associated constant bound, found type
20  --> $DIR/assoc_const_eq_diagnostic.rs:11:28
21   |
22LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
23   |                            ^^^^^^^^^^^^^^^^^ help: if equating a const, try wrapping with braces: `MODE = { const }`
24   |
25note: associated constant defined here
26  --> $DIR/assoc_const_eq_diagnostic.rs:8:5
27   |
28LL |     const MODE: Mode;
29   |     ^^^^^^^^^^^^^^^^
30
31error: expected associated constant bound, found type
32  --> $DIR/assoc_const_eq_diagnostic.rs:11:28
33   |
34LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
35   |                            ^^^^^^^^^^^^^^^^^ help: if equating a const, try wrapping with braces: `MODE = { const }`
36   |
37note: associated constant defined here
38  --> $DIR/assoc_const_eq_diagnostic.rs:8:5
39   |
40LL |     const MODE: Mode;
41   |     ^^^^^^^^^^^^^^^^
42
43error: aborting due to 4 previous errors
44
45For more information about this error, try `rustc --explain E0573`.