Skip to content
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

Merged
merged 1 commit into from
Jun 4, 2018

Conversation

Havvy
Copy link
Contributor

@Havvy Havvy commented Jun 1, 2018

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.

Copy link
Contributor

@matthewjasper matthewjasper left a comment

Choose a reason for hiding this comment

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

Couple of nits

> **<sup>Syntax</sup>**
> _WhereClause_ :
> **<sup>Syntax</sup>**
> _WhereClause_ :
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

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

or statement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or block expression

Copy link
Contributor Author

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...

@Havvy Havvy force-pushed the attr-in-type-param-position branch from 0599dd0 to c363127 Compare June 4, 2018 06:58
@Havvy
Copy link
Contributor Author

Havvy commented Jun 4, 2018

I may have made more changes than just the nits.

I did make them their own commits though, so it should be easier to look at each commit in isolation.

@Havvy Havvy force-pushed the attr-in-type-param-position branch from c363127 to 56b9cb2 Compare June 4, 2018 08:20
@Havvy
Copy link
Contributor Author

Havvy commented Jun 4, 2018

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.

@Havvy Havvy force-pushed the attr-in-type-param-position branch from 56b9cb2 to 05b0a98 Compare June 4, 2018 09:16
@matthewjasper
Copy link
Contributor

Thanks!

@matthewjasper matthewjasper merged commit c0c320a into rust-lang:master Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants