]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
Rollup merge of #106321 - compiler-errors:delayed-bug-backtrace, r=Nilstrieb
[rust.git] / tests / ui / const-generics / assoc_const_eq_diagnostic.stderr
1 error[E0573]: expected type, found variant `Mode::Cool`
2   --> $DIR/assoc_const_eq_diagnostic.rs:11:35
3    |
4 LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
5    |                                   ^^^^^^^^^^
6    |                                   |
7    |                                   not a type
8    |                                   help: try using the variant's enum: `Mode`
9
10 error[E0573]: expected type, found variant `Mode::Cool`
11   --> $DIR/assoc_const_eq_diagnostic.rs:15:17
12    |
13 LL | fn no_help() -> Mode::Cool {}
14    |                 ^^^^^^^^^^
15    |                 |
16    |                 not a type
17    |                 help: try using the variant's enum: `Mode`
18
19 error: expected associated constant bound, found type
20   --> $DIR/assoc_const_eq_diagnostic.rs:11:28
21    |
22 LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
23    |                            ^^^^^^^^^^^^^^^^^ help: if equating a const, try wrapping with braces: `MODE = { const }`
24    |
25 note: associated constant defined here
26   --> $DIR/assoc_const_eq_diagnostic.rs:8:5
27    |
28 LL |     const MODE: Mode;
29    |     ^^^^^^^^^^^^^^^^
30
31 error: aborting due to 3 previous errors
32
33 For more information about this error, try `rustc --explain E0573`.