fork/rust

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

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

master
1.6 KiB38 linesraw
1error: recursion limit reached while expanding `$crate::format_args_nl!`
2  --> $DIR/issue-41731-infinite-macro-println.rs:14:5
3   |
4LL |     stack!("overflow");
5   |     ^^^^^^^^^^^^^^^^^^
6   |
7   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "10"]` attribute to your crate (`issue_41731_infinite_macro_println`)
8   = note: this error originates in the macro `println` which comes from the expansion of the macro `stack` (in Nightly builds, run with -Z macro-backtrace for more info)
9
10note: trace_macro
11  --> $DIR/issue-41731-infinite-macro-println.rs:14:5
12   |
13LL |     stack!("overflow");
14   |     ^^^^^^^^^^^^^^^^^^
15   |
16   = note: expanding `stack! { "overflow" }`
17   = note: to `println! (stack! ("overflow")) ;`
18   = note: expanding `println! { stack! ("overflow") }`
19   = note: to `{ $crate :: io :: _print($crate :: format_args_nl! (stack! ("overflow"))) ; }`
20   = note: expanding `stack! { "overflow" }`
21   = note: to `println! (stack! ("overflow")) ;`
22   = note: expanding `println! { stack! ("overflow") }`
23   = note: to `{ $crate :: io :: _print($crate :: format_args_nl! (stack! ("overflow"))) ; }`
24
25error: format argument must be a string literal
26  --> $DIR/issue-41731-infinite-macro-println.rs:14:5
27   |
28LL |     stack!("overflow");
29   |     ^^^^^^^^^^^^^^^^^^
30   |
31   = note: this error originates in the macro `println` which comes from the expansion of the macro `stack` (in Nightly builds, run with -Z macro-backtrace for more info)
32help: you might be missing a string literal to format with
33   |
34LL |             println!("{}", stack!($overflow));
35   |                      +++++
36
37error: aborting due to 2 previous errors
38