You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/macros/trace_faulty_macros.stderr
+4-11
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ LL | my_recursive_macro!();
50
50
= note: expanding `my_recursive_macro! { }`
51
51
= note: to `my_recursive_macro! ();`
52
52
53
-
error: expected expression, found pattern `A { a: a, b: 0, c: _, .. }`
53
+
error: expected expression, found `pat` metavariable
54
54
--> $DIR/trace_faulty_macros.rs:16:9
55
55
|
56
56
LL | $a
@@ -69,22 +69,15 @@ LL | #[derive(Debug)]
69
69
LL | fn use_derive_macro_as_attr() {}
70
70
| -------------------------------- not a `struct`, `enum` or `union`
71
71
72
-
error: expected expression, found pattern `1 + 1`
72
+
error: expected expression, found `pat` metavariable
73
73
--> $DIR/trace_faulty_macros.rs:49:37
74
74
|
75
-
LL | (let $p:pat = $e:expr) => {test!(($p,$e))};
76
-
| -- this is interpreted as expression, but it is expected to be pattern
77
-
...
78
75
LL | (($p:pat, $e:pat)) => {let $p = $e;};
79
76
| ^^ expected expression
80
77
...
81
78
LL | test!(let x = 1+1);
82
-
| ------------------
83
-
| | |
84
-
| | this is expected to be expression
85
-
| in this macro invocation
79
+
| ------------------ in this macro invocation
86
80
|
87
-
= note: when forwarding a matched fragment to another macro-by-example, matchers in the second macro will see an opaque AST of the fragment type, not the underlying tokens
88
81
= note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
89
82
90
83
note: trace_macro
@@ -96,7 +89,7 @@ LL | let a = pat_macro!();
96
89
= note: expanding `pat_macro! { }`
97
90
= note: to `pat_macro! (A { a : a, b : 0, c : _, .. });`
98
91
= note: expanding `pat_macro! { A { a : a, b : 0, c : _, .. } }`
0 commit comments