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

Generate stability attributes for derived impls #29152

Merged
merged 1 commit into from
Oct 20, 2015

Conversation

petrochenkov
Copy link
Contributor

The attributes are copied from the item for which the trait impl is derived

I think now we can close these two issues:
#13054 - allow, deny etc. were already copied, now stable and unstable are copied as well.
#18969 - I'm not sure this is needed, insta-stability were good enough so far, copied stability will be better. Nonetheless, it can be subsumed by some more general mechanism for supplying arbitrary not necessarily stability related attributes (for example inline) to derived impls and their methods (I haven't found an open issue for such mechanism).

r? @alexcrichton

The attributes are copied from the item for which the trait impl is derived
@alexcrichton
Copy link
Member

Yeah I think this is fine, trait impls are already insta-stable anyway and we can perhaps revisit later in the future if we're able to get around that!

@bors: r+ 629c2a8

Thanks!

@bors
Copy link
Contributor

bors commented Oct 20, 2015

⌛ Testing commit 629c2a8 with merge db54339...

bors added a commit that referenced this pull request Oct 20, 2015
The attributes are copied from the item for which the trait impl is derived

I think now we can close these two issues:
#13054 - `allow`, `deny` etc. were already copied, now `stable` and `unstable` are copied as well.
#18969 - I'm not sure this is needed, insta-stability were good enough so far, copied stability will be better. Nonetheless, it can be subsumed by some more general mechanism for supplying arbitrary not necessarily stability related attributes (for example `inline`) to derived impls and their methods (I haven't found an open issue for such mechanism).

r? @alexcrichton
@bors bors merged commit 629c2a8 into rust-lang:master Oct 20, 2015
@petrochenkov petrochenkov deleted the derstab branch November 22, 2015 11:34
petrochenkov referenced this pull request in petrochenkov/rust Dec 14, 2015
@jyn514 jyn514 added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-stability Area: `#[stable]`, `#[unstable]` etc. labels Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-stability Area: `#[stable]`, `#[unstable]` etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants