1
Fork 0
rust/src/test/ui/macros/trace_faulty_macros.stderr

83 lines
2.7 KiB
Text
Raw Normal View History

2017-09-02 17:21:13 +02:00
error: no rules expected the token `bcd`
2018-12-25 08:56:47 -07:00
--> $DIR/trace_faulty_macros.rs:7:26
2017-09-02 17:21:13 +02:00
|
LL | macro_rules! my_faulty_macro {
| ---------------------------- when calling this macro
LL | () => {
2019-03-09 15:03:44 +03:00
LL | my_faulty_macro!(bcd);
| ^^^ no rules expected this token in macro call
2017-09-02 17:21:13 +02:00
...
LL | my_faulty_macro!();
| ------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2017-09-02 17:21:13 +02:00
note: trace_macro
2020-03-21 22:12:24 +01:00
--> $DIR/trace_faulty_macros.rs:31:5
2017-09-02 17:21:13 +02:00
|
2018-02-23 03:42:32 +03:00
LL | my_faulty_macro!();
2017-09-02 17:21:13 +02:00
| ^^^^^^^^^^^^^^^^^^^
|
= note: expanding `my_faulty_macro! { }`
= note: to `my_faulty_macro ! (bcd) ;`
2017-09-02 17:21:13 +02:00
= note: expanding `my_faulty_macro! { bcd }`
error: recursion limit reached while expanding `my_recursive_macro!`
2018-12-25 08:56:47 -07:00
--> $DIR/trace_faulty_macros.rs:22:9
2017-09-02 17:21:13 +02:00
|
2019-03-09 15:03:44 +03:00
LL | my_recursive_macro!();
2017-09-02 17:21:13 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^
...
2018-02-23 03:42:32 +03:00
LL | my_recursive_macro!();
2017-09-02 17:21:13 +02:00
| ---------------------- in this macro invocation
|
= help: consider adding a `#![recursion_limit="8"]` attribute to your crate (`trace_faulty_macros`)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2017-09-02 17:21:13 +02:00
note: trace_macro
2020-03-21 22:12:24 +01:00
--> $DIR/trace_faulty_macros.rs:32:5
2017-09-02 17:21:13 +02:00
|
2018-02-23 03:42:32 +03:00
LL | my_recursive_macro!();
2017-09-02 17:21:13 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: expanding `my_recursive_macro! { }`
= note: to `my_recursive_macro ! () ;`
2017-09-02 17:21:13 +02:00
= note: expanding `my_recursive_macro! { }`
= note: to `my_recursive_macro ! () ;`
2017-09-02 17:21:13 +02:00
= note: expanding `my_recursive_macro! { }`
= note: to `my_recursive_macro ! () ;`
2017-09-02 17:21:13 +02:00
= note: expanding `my_recursive_macro! { }`
= note: to `my_recursive_macro ! () ;`
2017-09-02 17:21:13 +02:00
2020-02-29 04:23:58 +01:00
error: expected expression, found `A { a: a, b: 0, c: _, .. }`
--> $DIR/trace_faulty_macros.rs:16:9
|
LL | $a
| ^^ expected expression
...
LL | let a = pat_macro!();
| ------------ in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2020-09-05 14:55:15 +02:00
error[E0774]: `derive` may only be applied to structs, enums and unions
2020-03-21 22:12:24 +01:00
--> $DIR/trace_faulty_macros.rs:42:1
|
LL | #[derive(Debug)]
| ^^^^^^^^^^^^^^^^
note: trace_macro
--> $DIR/trace_faulty_macros.rs:36:13
|
LL | let a = pat_macro!();
| ^^^^^^^^^^^^
|
= note: expanding `pat_macro! { }`
= note: to `pat_macro ! (A { a : a, b : 0, c : _, .. }) ;`
= note: expanding `pat_macro! { A { a : a, b : 0, c : _, .. } }`
= note: to `A { a: a, b: 0, c: _, .. }`
error: aborting due to 4 previous errors
2018-03-15 16:13:47 +01:00
2020-09-05 14:55:15 +02:00
For more information about this error, try `rustc --explain E0774`.