Skip to content

Conversation

Manishearth
Copy link
Member

Adds an attrs field to FieldInfo which lets one check the attributes on
a field whilst expanding.

This lets deriving plugins be more robust, for example providing the ability to
"ignore" a field for the purpose of deriving, or perhaps handle the field a
different way.

r? @huonw

@@ -378,7 +380,7 @@ impl<'a> TraitDef<'a> {
pub fn expand(&self,
cx: &mut ExtCtxt,
mitem: &ast::MetaItem,
item: &ast::Item,
item: &'a ast::Item,
Copy link
Contributor

Choose a reason for hiding this comment

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

Accidental whitespace?

@huonw
Copy link
Contributor

huonw commented May 2, 2015

r=me with the whitespace fix. Also, tidy failed on travis.

@Manishearth
Copy link
Member Author

@bors: r=huonw

@bors
Copy link
Collaborator

bors commented May 2, 2015

📌 Commit 5892b40 has been approved by huonw

@bors
Copy link
Collaborator

bors commented May 2, 2015

⌛ Testing commit 5892b40 with merge 354d16b...

bors added a commit that referenced this pull request May 2, 2015
Adds an `attrs` field to `FieldInfo` which lets one check the attributes on
a field whilst expanding.

This lets deriving plugins be more robust, for example providing the ability to
"ignore" a field for the purpose of deriving, or perhaps handle the field a
different way.


r? @huonw
@bors
Copy link
Collaborator

bors commented May 2, 2015

@bors bors merged commit 5892b40 into rust-lang:master May 2, 2015
@Manishearth Manishearth deleted the deriving_attr branch May 6, 2015 10:56
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.

3 participants