Skip to content

Referenceify conditional compilation #444

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

Merged
merged 3 commits into from
Nov 18, 2018

Conversation

Havvy
Copy link
Contributor

@Havvy Havvy commented Oct 9, 2018

Rendered

Fixes #384

Partial r? @ehuss for grammar additions.

I put a couple questions into comments into the source itself.

I also wonder if making each configuration option set by the compiler its own section like I did is too spacey. I could bring it back down into a list if y'all agree with that.

@Havvy Havvy added the Language Cleanup Improvements to existing language which is correct but not clear, or missing examples, or the like. label Oct 9, 2018

Example values:

* `"x86"`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some random trailing commas here.

> &nbsp;&nbsp; [IDENTIFIER]&nbsp;(`=` ([STRING_LITERAL] | [RAW_STRING_LITERAL]))<sup>?</sup>
>
> _ConfigurationAll_\
> &nbsp;&nbsp; `all` `(` _ConfigurationPredicate_ (`,` _ConfigurationPredicate_)<sup>\*</sup> `,`<sup>?</sup> `)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These don't seem to capture that they can be an empty list. Not sure if that is important, since that is an odd usage.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any significant comments. Maybe move the Forms section before the option list, because you have to scroll all the way to the bottom to see any examples. But that's not critical, either way is fine.

> **Note**: The `cfg_attr` can expand to another `cfg_attr`. For example,
> `#[cfg_attr(linux, cfg_attr(feature = "multithreaded", some_other_attribute))`
> is valid. This example would be equivalent to
> `#[cfg_attr(and(linux, feaure ="multithreaded"), some_other_attribute)]`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feaure → feature

@Havvy
Copy link
Contributor Author

Havvy commented Oct 17, 2018

I don't like having them all the way on the bottom either, and the page is describing things in a bottom-up way. Perhaps we should invert it, and explain the attributes and macro first?

for targets with 32-bit pointers, this is set to `"32"`. Likewise, it is set
to `"64"` for targets with 64-bit pointers.

<!-- Are there targets that have a different bit number? -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a 16 bit platform listed in tier 3 here

@matthewjasper matthewjasper merged commit 2febdc5 into rust-lang:master Nov 18, 2018
@matthewjasper
Copy link
Contributor

Thanks!

@Havvy Havvy deleted the conditional-configuration branch March 19, 2019 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Cleanup Improvements to existing language which is correct but not clear, or missing examples, or the like.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants