diff options
| author | Michele d'Amico <michele.damico@gmail.com> | 2019-07-17 02:40:33 +0200 |
|---|---|---|
| committer | Seiichi Uchida <seuchida@gmail.com> | 2019-07-17 09:40:33 +0900 |
| commit | 76e2ba25bd419beedbbc15aec6b4c6aef4deffaf (patch) | |
| tree | 1f568fef8a696140a33628fc725a72d6b6b7d9c1 /src/attr.rs | |
| parent | 66c27c9161b2aa70c2902807be12952bd4a0a62b (diff) | |
#3665: Implemented (#3689)
Diffstat (limited to 'src/attr.rs')
| -rw-r--r-- | src/attr.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/attr.rs b/src/attr.rs index 8497917ab06..1c9092ea629 100644 --- a/src/attr.rs +++ b/src/attr.rs @@ -319,9 +319,13 @@ impl Rewrite for ast::Attribute { if self.is_sugared_doc { rewrite_doc_comment(snippet, shape.comment(context.config), context.config) } else { + let should_skip = self + .ident() + .map(|s| context.skip_context.skip_attribute(&s.name.as_str())) + .unwrap_or(false); let prefix = attr_prefix(self); - if contains_comment(snippet) { + if should_skip || contains_comment(snippet) { return Some(snippet.to_owned()); } |
