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
In the Rust book under Hygiene section for the following code:
macro_rules! foo { ($v:ident) => (let $v = 3); } fn main() { foo!(x); println!("{}", x); }
There is missing a semi-colon at the line let $v = 3 which doesn't compile in Rust Playground
let $v = 3
https://doc.rust-lang.org/1.7.0/book/macros.html#hygiene
The text was updated successfully, but these errors were encountered:
That link is from the 1.7 docs, which is more than 4 years old. I believe that code was valid at the time, but was changed in #34660.
The corrected, old documentation can be found at: https://doc.rust-lang.org/1.30.0/book/first-edition/macros.html#hygiene Hygiene was removed from the new edition (https://doc.rust-lang.org/book/ch19-06-macros.html). I would guess that is because it is an advanced topic, which is covered in the reference.
cc #44687, where there really should be a version selector, and https://internals.rust-lang.org/t/adding-outdated-notices-to-archived-versions-of-documentation/12281 for the request for a bold disclaimer to indicate you are looking at outdated documentation.
Sorry, something went wrong.
No branches or pull requests
What needs to be fixed?
In the Rust book under Hygiene section for the following code:
There is missing a semi-colon at the line
let $v = 3
which doesn't compile in Rust PlaygroundPage(s) Affected
https://doc.rust-lang.org/1.7.0/book/macros.html#hygiene
The text was updated successfully, but these errors were encountered: