Skip to content

Extend #[deriving] to allow options to be specified #7229

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

Closed
huonw opened this issue Jun 19, 2013 · 4 comments
Closed

Extend #[deriving] to allow options to be specified #7229

huonw opened this issue Jun 19, 2013 · 4 comments
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-syntaxext Area: Syntax extensions C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@huonw
Copy link
Member

huonw commented Jun 19, 2013

This would make deriving significantly more flexible, e.g. for #3740:

#[deriving(Encodable(encoder="RustcEncoder"))]
struct Foo { ... }

And for specifying an order of fields to sort by:

#[deriving(Ord(bar, baz))]
struct Foo { baz: uint, bar: uint }
@emberian
Copy link
Member

Nominating for feature complete

@huonw
Copy link
Member Author

huonw commented Jun 27, 2013

@cmr points out that being able to specify which fields are relevant for Eq would be neat too.

@ghost ghost assigned huonw Jul 24, 2013
@huonw huonw mentioned this issue Aug 3, 2013
@catamorphism
Copy link
Contributor

Needs discussion, de-nominating for now.

@emberian
Copy link
Member

Visiting for triage... this was rejected once, in code form. Closing :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-syntaxext Area: Syntax extensions C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants