diff options
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()); } |
