fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.4 KiB66 linesraw
1error: expected type, found `{`
2  --> $DIR/macro-fail.rs:28:27
3   |
4LL | 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...
10LL |       ($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
15error: expected type, found `{`
16  --> $DIR/macro-fail.rs:28:27
17   |
18LL |   Example::<gimme_a_const!(marker)>
19   |             ----------------------
20   |             |
21   |             this macro call doesn't expand to a type
22   |             in this macro invocation
23...
24LL |       ($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
29error: expected type, found `{`
30  --> $DIR/macro-fail.rs:4:10
31   |
32LL |   () => {{
33   |          ^ expected type
34...
35LL |   let _fail = Example::<external_macro!()>;
36   |                         -----------------
37   |                         |
38   |                         this macro call doesn't expand to a type
39   |                         in this macro invocation
40   |
41   = note: this error originates in the macro `external_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
42
43error: unexpected end of macro invocation
44  --> $DIR/macro-fail.rs:37:25
45   |
46LL |     macro_rules! gimme_a_const {
47   |     -------------------------- when calling this macro
48...
49LL |   let _fail = Example::<gimme_a_const!()>;
50   |                         ^^^^^^^^^^^^^^^^ missing tokens in macro arguments
51   |
52note: while trying to match meta-variable `$rusty:ident`
53  --> $DIR/macro-fail.rs:28:8
54   |
55LL |       ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
56   |        ^^^^^^^^^^^^^
57
58error[E0747]: type provided when a constant was expected
59  --> $DIR/macro-fail.rs:14:33
60   |
61LL | fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
62   |                                 ^^^^^^^^^^^^^^^^^^^^^^
63
64error: aborting due to 5 previous errors
65
66For more information about this error, try `rustc --explain E0747`.