]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/macro_rules-braces.full.stderr
Permit standalone generic parameters as const generic arguments in macros
[rust.git] / src / test / ui / const-generics / macro_rules-braces.full.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: constant expression depends on a generic parameter
13   --> $DIR/macro_rules-braces.rs:10:13
14    |
15 LL |             [u8; $x]
16    |             ^^^^^^^^
17 ...
18 LL |     let _: foo!({{ N }});
19    |            ------------- in this macro invocation
20    |
21    = note: this may fail depending on what value the parameter takes
22    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
23
24 error: constant expression depends on a generic parameter
25   --> $DIR/macro_rules-braces.rs:15:13
26    |
27 LL |             [u8; { $x }]
28    |             ^^^^^^^^^^^^
29 ...
30 LL |     let _: bar!({ N });
31    |            ----------- in this macro invocation
32    |
33    = note: this may fail depending on what value the parameter takes
34    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
35
36 error: constant expression depends on a generic parameter
37   --> $DIR/macro_rules-braces.rs:20:13
38    |
39 LL |             Foo<$x>
40    |             ^^^^^^^
41 ...
42 LL |     let _: baz!({{ N }});
43    |            ------------- in this macro invocation
44    |
45    = note: this may fail depending on what value the parameter takes
46    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
47
48 error: constant expression depends on a generic parameter
49   --> $DIR/macro_rules-braces.rs:25:13
50    |
51 LL |             Foo<{ $x }>
52    |             ^^^^^^^^^^^
53 ...
54 LL |     let _: biz!({ N });
55    |            ----------- in this macro invocation
56    |
57    = note: this may fail depending on what value the parameter takes
58    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
59
60 error: aborting due to 5 previous errors
61