diff options
| author | bors <bors@rust-lang.org> | 2018-05-03 11:52:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-03 11:52:03 +0000 |
| commit | d68b0eceaaf719a4702ab13a7ca62dea5d966082 (patch) | |
| tree | c7a351327d19c398532f139444d4cc652070318d /src/libsyntax_ext/deriving/custom.rs | |
| parent | 698b956a9fca9688632d617dd6d73cae834237a3 (diff) | |
| parent | 84f450866041e0269875acb1350920308cdc109f (diff) | |
| download | rust-d68b0eceaaf719a4702ab13a7ca62dea5d966082.tar.gz rust-d68b0eceaaf719a4702ab13a7ca62dea5d966082.zip | |
Auto merge of #50030 - flip1995:rfc2103, r=petrochenkov
Implement tool_attributes feature (RFC 2103) cc #44690 This is currently just a rebased and compiling (hopefully) version of #47773. Let's see if travis likes this. I will add the implementation for `tool_lints` this week.
Diffstat (limited to 'src/libsyntax_ext/deriving/custom.rs')
| -rw-r--r-- | src/libsyntax_ext/deriving/custom.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsyntax_ext/deriving/custom.rs b/src/libsyntax_ext/deriving/custom.rs index 5fd5e299488..76da1746a03 100644 --- a/src/libsyntax_ext/deriving/custom.rs +++ b/src/libsyntax_ext/deriving/custom.rs @@ -22,11 +22,9 @@ struct MarkAttrs<'a>(&'a [ast::Name]); impl<'a> Visitor<'a> for MarkAttrs<'a> { fn visit_attribute(&mut self, attr: &Attribute) { - if let Some(name) = attr.name() { - if self.0.contains(&name) { - mark_used(attr); - mark_known(attr); - } + if self.0.contains(&attr.name()) { + mark_used(attr); + mark_known(attr); } } |
