-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
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
Make documentation clear about conditional compilation use #15494
Comments
It's an oversight in the documentation. The set of placed attribute have been allowed has slowly expanded and the documentation hasn't kept up. |
Which documentation says this? I'd like to fix it. |
Looks like here @steveklabnik: http://doc.rust-lang.org/rust.html#attributes |
Ahh yes. The manual certainly needs lots of improvement. I'd welcome a fix to this section, if nobody else gets to it, I will at some point. |
minor: Sync from downstream
From what I read of the documentation, only whole items/modules/crates can be processed through conditional compilation.
Though this is not in the documentation, this seems to work:
As expected, the compiler throws an error (on Linux):
However, it's not clear in the documentation what is the scope of the attribute in this instance. Have I got my idea of what is an item wrong, or is this merely an oversight in the documentation?
The text was updated successfully, but these errors were encountered: