]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/trace_faulty_macros.stderr
Rollup merge of #106714 - Ezrashaw:remove-e0490, r=davidtwco
[rust.git] / tests / ui / macros / trace_faulty_macros.stderr
1 error: no rules expected the token `bcd`
2   --> $DIR/trace_faulty_macros.rs:7:26
3    |
4 LL | macro_rules! my_faulty_macro {
5    | ---------------------------- when calling this macro
6 LL |     () => {
7 LL |         my_faulty_macro!(bcd);
8    |                          ^^^ no rules expected this token in macro call
9 ...
10 LL |     my_faulty_macro!();
11    |     ------------------ in this macro invocation
12    |
13    = note: while trying to match end of macro
14    = note: this error originates in the macro `my_faulty_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
15
16 note: trace_macro
17   --> $DIR/trace_faulty_macros.rs:31:5
18    |
19 LL |     my_faulty_macro!();
20    |     ^^^^^^^^^^^^^^^^^^
21    |
22    = note: expanding `my_faulty_macro! {  }`
23    = note: to `my_faulty_macro! (bcd) ;`
24    = note: expanding `my_faulty_macro! { bcd }`
25
26 error: recursion limit reached while expanding `my_recursive_macro!`
27   --> $DIR/trace_faulty_macros.rs:22:9
28    |
29 LL |         my_recursive_macro!();
30    |         ^^^^^^^^^^^^^^^^^^^^^
31 ...
32 LL |     my_recursive_macro!();
33    |     --------------------- in this macro invocation
34    |
35    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "8"]` attribute to your crate (`trace_faulty_macros`)
36    = note: this error originates in the macro `my_recursive_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
37
38 note: trace_macro
39   --> $DIR/trace_faulty_macros.rs:32:5
40    |
41 LL |     my_recursive_macro!();
42    |     ^^^^^^^^^^^^^^^^^^^^^
43    |
44    = note: expanding `my_recursive_macro! {  }`
45    = note: to `my_recursive_macro! () ;`
46    = note: expanding `my_recursive_macro! {  }`
47    = note: to `my_recursive_macro! () ;`
48    = note: expanding `my_recursive_macro! {  }`
49    = note: to `my_recursive_macro! () ;`
50    = note: expanding `my_recursive_macro! {  }`
51    = note: to `my_recursive_macro! () ;`
52
53 error: expected expression, found `A { a: a, b: 0, c: _, .. }`
54   --> $DIR/trace_faulty_macros.rs:16:9
55    |
56 LL |         $a
57    |         ^^ expected expression
58 ...
59 LL |     let a = pat_macro!();
60    |             ------------ in this macro invocation
61    |
62    = note: this error originates in the macro `pat_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
63
64 error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
65   --> $DIR/trace_faulty_macros.rs:42:1
66    |
67 LL | #[derive(Debug)]
68    | ^^^^^^^^^^^^^^^^ not applicable here
69 LL | fn use_derive_macro_as_attr() {}
70    | -------------------------------- not a `struct`, `enum` or `union`
71
72 note: trace_macro
73   --> $DIR/trace_faulty_macros.rs:36:13
74    |
75 LL |     let a = pat_macro!();
76    |             ^^^^^^^^^^^^
77    |
78    = note: expanding `pat_macro! {  }`
79    = note: to `pat_macro! (A { a : a, b : 0, c : _, .. }) ;`
80    = note: expanding `pat_macro! { A { a : a, b : 0, c : _, .. } }`
81    = note: to `A { a: a, b: 0, c: _, .. }`
82
83 error: aborting due to 4 previous errors
84
85 For more information about this error, try `rustc --explain E0774`.