Open padix-key opened 4 years ago
The Captures and Expansion Redux chapter states that the following Rust code
Captures and Expansion Redux
macro_rules! capture_expr_then_stringify { ($e:expr) => { stringify!($e) }; } fn main() { println!("{:?}", stringify!(dummy(2 * (1 + (3))))); println!("{:?}", capture_expr_then_stringify!(dummy(2 * (1 + (3))))); }
produces the following output:
"dummy ( 2 * ( 1 + ( 3 ) ) )" "dummy(2 * (1 + (3)))"
But executing the code on Rust Playground gives me:
Rust Playground
"dummy (2 * (1 + (3)))" "dummy(2 * (1 + (3)))"
Rustc probably changed how it pretty prints since the code was written. Both results are fine, as they parse to the same expression.
The
Captures and Expansion Redux
chapter states that the following Rust codeproduces the following output:
But executing the code on
Rust Playground
gives me: