We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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)))"
The text was updated successfully, but these errors were encountered:
Rustc probably changed how it pretty prints since the code was written. Both results are fine, as they parse to the same expression.
Sorry, something went wrong.
No branches or pull requests
The
Captures and Expansion Redux
chapter states that the following Rust codeproduces the following output:
But executing the code on
Rust Playground
gives me:The text was updated successfully, but these errors were encountered: