]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/min_const_generics/macro-fail.stderr
Rollup merge of #103396 - RalfJung:pinning-closure-captures, r=dtolnay
[rust.git] / src / test / ui / const-generics / min_const_generics / macro-fail.stderr
1 error: expected type, found `{`
2   --> $DIR/macro-fail.rs:28:27
3    |
4 LL | fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
5    |                                 ----------------------
6    |                                 |
7    |                                 this macro call doesn't expand to a type
8    |                                 in this macro invocation
9 ...
10 LL |       ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
11    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type
12    |
13    = note: this error originates in the macro `gimme_a_const` (in Nightly builds, run with -Z macro-backtrace for more info)
14
15 error: expected type, found `{`
16   --> $DIR/macro-fail.rs:28:27
17    |
18 LL |   Example::<gimme_a_const!(marker)>
19    |             ----------------------
20    |             |
21    |             this macro call doesn't expand to a type
22    |             in this macro invocation
23 ...
24 LL |       ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
25    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type
26    |
27    = note: this error originates in the macro `gimme_a_const` (in Nightly builds, run with -Z macro-backtrace for more info)
28
29 error: expected type, found `{`
30   --> $DIR/macro-fail.rs:4:10
31    |
32 LL |     () => {{
33    |  __________^
34 LL | |
35 LL | |     const X: usize = 1337;
36 LL | |     X
37 LL | |   }}
38    | |___^ expected type
39 ...
40 LL |     let _fail = Example::<external_macro!()>;
41    |                           -----------------
42    |                           |
43    |                           this macro call doesn't expand to a type
44    |                           in this macro invocation
45    |
46    = note: this error originates in the macro `external_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
47
48 error: unexpected end of macro invocation
49   --> $DIR/macro-fail.rs:37:25
50    |
51 LL |     macro_rules! gimme_a_const {
52    |     -------------------------- when calling this macro
53 ...
54 LL |   let _fail = Example::<gimme_a_const!()>;
55    |                         ^^^^^^^^^^^^^^^^ missing tokens in macro arguments
56    |
57 note: while trying to match meta-variable `$rusty:ident`
58   --> $DIR/macro-fail.rs:28:8
59    |
60 LL |       ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
61    |        ^^^^^^^^^^^^^
62
63 error[E0747]: type provided when a constant was expected
64   --> $DIR/macro-fail.rs:14:33
65    |
66 LL | fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
67    |                                 ^^^^^^^^^^^^^^^^^^^^^^
68
69 error: aborting due to 5 previous errors
70
71 For more information about this error, try `rustc --explain E0747`.