1 error: expected type, found `{`
2 --> $DIR/macro-fail.rs:28:27
4 LL | fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
5 | ----------------------
7 | this macro call doesn't expand to a type
8 | in this macro invocation
10 LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type
13 = note: this error originates in the macro `gimme_a_const` (in Nightly builds, run with -Z macro-backtrace for more info)
15 error: expected type, found `{`
16 --> $DIR/macro-fail.rs:28:27
18 LL | Example::<gimme_a_const!(marker)>
19 | ----------------------
21 | this macro call doesn't expand to a type
22 | in this macro invocation
24 LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type
27 = note: this error originates in the macro `gimme_a_const` (in Nightly builds, run with -Z macro-backtrace for more info)
29 error: expected type, found `{`
30 --> $DIR/macro-fail.rs:4:10
35 LL | | const X: usize = 1337;
40 LL | let _fail = Example::<external_macro!()>;
43 | this macro call doesn't expand to a type
44 | in this macro invocation
46 = note: this error originates in the macro `external_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
48 error: unexpected end of macro invocation
49 --> $DIR/macro-fail.rs:37:25
51 LL | macro_rules! gimme_a_const {
52 | -------------------------- when calling this macro
54 LL | let _fail = Example::<gimme_a_const!()>;
55 | ^^^^^^^^^^^^^^^^ missing tokens in macro arguments
57 note: while trying to match meta-variable `$rusty:ident`
58 --> $DIR/macro-fail.rs:28:8
60 LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
63 error[E0747]: type provided when a constant was expected
64 --> $DIR/macro-fail.rs:14:33
66 LL | fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
67 | ^^^^^^^^^^^^^^^^^^^^^^
69 error: aborting due to 5 previous errors
71 For more information about this error, try `rustc --explain E0747`.