-
Notifications
You must be signed in to change notification settings - Fork 563
document cfg conditions on inline assembly templates and operands
#2063
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
base: master
Are you sure you want to change the base?
Conversation
8fc2f56 to
58e0705
Compare
841e6ba to
99014a3
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
There was a stray comma on this info string. Let's remove it.
This test is believed to fail, so we should mark it with `compile_fail` rather than `ignore`. Let's wrap the comment. The compiler's error message, in this case, doesn't add any insight; let's remove the details of that.
The sentence "Other attributes are parsed but rejected" has a two-part
compound predicate; that is, the subject is used for two verbs,
separated by a coordinating conjunction ("but"), and is not repeated.
In these cases, a comma is omitted before the coordinating
conjunction, so let's remove the comma.
We have a list that describes where attributes may be applied. We're adding inline assembly template strings and operands to that list, but only certain attributes may be used, and other caveats apply. Let's note that there are restrictions and link to the relevant section for more details, as we do already for certain other items on this list. It may be important, normatively, to note this restriction here if we now or later refer to some attribute as being accepted anywhere that attributes are allowed.
The implementation of attributes for asm macro template strings and operands doesn't use the normal system in `rustc` for handling attributes. This leads to the limitations and may lead to subtle divergences in behavior. Let's make a note about this. For background, see: - rust-lang#2063 (comment) - rust-lang/rust#147736 (comment)
|
I've pushed a series of revisions. Some of this is editorial; some has potential normative effect on other parts of the document where we may refer to other attributes as being accepted wherever attributes are allowed. For details, see the commit messages. With these revisions, this looks good to me. |
Reference PR for:
asm_cfgrust#147736