]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/macro_rules-braces.min.stderr
Permit standalone generic parameters as const generic arguments in macros
[rust.git] / src / test / ui / const-generics / macro_rules-braces.min.stderr
1 error: expressions must be enclosed in braces to be used as const generic arguments
2   --> $DIR/macro_rules-braces.rs:54:17
3    |
4 LL |     let _: baz!(10 + 7);
5    |                 ^^^^^^
6    |
7 help: enclose the `const` expression in braces
8    |
9 LL |     let _: baz!({ 10 + 7 });
10    |                 ^        ^
11
12 error: generic parameters may not be used in const operations
13   --> $DIR/macro_rules-braces.rs:31:20
14    |
15 LL |     let _: foo!({{ N }});
16    |                    ^ cannot perform const operation using `N`
17    |
18    = help: const parameters may only be used as standalone arguments, i.e. `N`
19
20 error: generic parameters may not be used in const operations
21   --> $DIR/macro_rules-braces.rs:33:19
22    |
23 LL |     let _: bar!({ N });
24    |                   ^ cannot perform const operation using `N`
25    |
26    = help: const parameters may only be used as standalone arguments, i.e. `N`
27
28 error: generic parameters may not be used in const operations
29   --> $DIR/macro_rules-braces.rs:36:20
30    |
31 LL |     let _: baz!({{ N }});
32    |                    ^ cannot perform const operation using `N`
33    |
34    = help: const parameters may only be used as standalone arguments, i.e. `N`
35
36 error: generic parameters may not be used in const operations
37   --> $DIR/macro_rules-braces.rs:38:19
38    |
39 LL |     let _: biz!({ N });
40    |                   ^ cannot perform const operation using `N`
41    |
42    = help: const parameters may only be used as standalone arguments, i.e. `N`
43
44 error: aborting due to 5 previous errors
45