-
Notifications
You must be signed in to change notification settings - Fork 530
Attributes in generics position and general attributes improvements #350
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
Attributes in generics position and general attributes improvements #350
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nits
src/items/generics.md
Outdated
> **<sup>Syntax</sup>** | ||
> _WhereClause_ : | ||
> **<sup>Syntax</sup>** | ||
> _WhereClause_ : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These spaces are needed for line breaks. They could be replaced with <br>
s if you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<br>
s would be even more noisy. I'll just revert the removal.
(C#). An attribute is a general, free-form metadatum that is interpreted | ||
according to name, convention, and language and compiler version. Attributes | ||
may appear as any of: | ||
Any [item declaration] or [generic lifetime or type parameter][generics] may |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or block expression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this is a lot more complicated, because also enum variants, struct and union fields, match arms...
0599dd0
to
c363127
Compare
|
c363127
to
56b9cb2
Compare
I retract the previous comment. I've removed the extra commits, and will be working on them in a separate PR. This includes adding the other places that attributes can be found. |
56b9cb2
to
05b0a98
Compare
05b0a98
to
3136dca
Compare
Thanks! |
Attributes in generics is stabilized in 1.27 as per rust-lang/rust#48851.
I moved the defining italics for attributes to the actual definition and gave inner/outer attributes actual definition lines instead of leaving it implied.
There's also a few newlines for 80 character style and removing trailing spaces in here.