error: expected one of `,` or `>`, found `3` --> $DIR/const-expression-suggest-missing-braces.rs:8:17 | LL | foo::(); | ^ expected one of `,` or `>` | help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR + 3 }>(); | ^ ^ error: expressions must be enclosed in braces to be used as const generic arguments --> $DIR/const-expression-suggest-missing-braces.rs:21:11 | LL | foo::<3 + 3>(); | ^^^^^ | help: enclose the `const` expression in braces | LL | foo::<{ 3 + 3 }>(); | ^ ^ error: expected one of `,` or `>`, found `-` --> $DIR/const-expression-suggest-missing-braces.rs:24:15 | LL | foo::(); | ^ expected one of `,` or `>` | help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR - 3 }>(); | ^ ^ error: expected one of `,` or `>`, found `-` --> $DIR/const-expression-suggest-missing-braces.rs:27:15 | LL | foo::(); | ^ expected one of `,` or `>` | help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR - BAR }>(); | ^ ^ error: expressions must be enclosed in braces to be used as const generic arguments --> $DIR/const-expression-suggest-missing-braces.rs:30:11 | LL | foo::<100 - BAR>(); | ^^^^^^^^^ | help: enclose the `const` expression in braces | LL | foo::<{ 100 - BAR }>(); | ^ ^ error: expected one of `,` or `>`, found `(` --> $DIR/const-expression-suggest-missing-braces.rs:33:19 | LL | foo::()>(); | ^ expected one of `,` or `>` | help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ bar() }>(); | ^ ^ error: expected one of `,` or `>`, found `(` --> $DIR/const-expression-suggest-missing-braces.rs:36:21 | LL | foo::()>(); | ^ expected one of `,` or `>` | help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ bar::() }>(); | ^ ^ error: expected one of `,` or `>`, found `(` --> $DIR/const-expression-suggest-missing-braces.rs:39:21 | LL | foo::() + BAR>(); | ^ expected one of `,` or `>` | help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ bar::() + BAR }>(); | ^ ^ error: expected one of `,` or `>`, found `(` --> $DIR/const-expression-suggest-missing-braces.rs:42:21 | LL | foo::() - BAR>(); | ^ expected one of `,` or `>` | help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ bar::() - BAR }>(); | ^ ^ error: expected one of `,` or `>`, found `-` --> $DIR/const-expression-suggest-missing-braces.rs:45:15 | LL | foo::()>(); | ^ expected one of `,` or `>` | help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR - bar::() }>(); | ^ ^ error: expected one of `,` or `>`, found `-` --> $DIR/const-expression-suggest-missing-braces.rs:48:15 | LL | foo::()>(); | ^ expected one of `,` or `>` | help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR - bar::() }>(); | ^ ^ error[E0404]: expected trait, found constant `BAR` --> $DIR/const-expression-suggest-missing-braces.rs:13:11 | LL | foo::(); | ^^^ not a trait error[E0404]: expected trait, found constant `BAR` --> $DIR/const-expression-suggest-missing-braces.rs:13:17 | LL | foo::(); | ^^^ not a trait warning: trait objects without an explicit `dyn` are deprecated --> $DIR/const-expression-suggest-missing-braces.rs:13:11 | LL | foo::(); | ^^^^^^^^^ help: use `dyn`: `dyn BAR + BAR` | = note: `#[warn(bare_trait_objects)]` on by default error[E0107]: wrong number of const arguments: expected 1, found 0 --> $DIR/const-expression-suggest-missing-braces.rs:13:5 | LL | foo::(); | ^^^^^^^^^^^^^^^^ expected 1 const argument error[E0107]: wrong number of type arguments: expected 0, found 1 --> $DIR/const-expression-suggest-missing-braces.rs:13:11 | LL | foo::(); | ^^^^^^^^^ unexpected type argument error: aborting due to 15 previous errors; 1 warning emitted Some errors have detailed explanations: E0107, E0404. For more information about an error, try `rustc --explain E0107`.