We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9f3611 commit 52ee203Copy full SHA for 52ee203
src/libsyntax/attr.rs
@@ -371,11 +371,13 @@ impl Attribute {
371
let meta = mk_name_value_item_str(
372
Symbol::intern("doc"),
373
Symbol::intern(&strip_doc_comment_decoration(&comment.as_str())));
374
- if self.style == ast::AttrStyle::Outer {
375
- f(&mk_attr_outer(self.span, self.id, meta))
+ let mut attr = if self.style == ast::AttrStyle::Outer {
+ mk_attr_outer(self.span, self.id, meta)
376
} else {
377
- f(&mk_attr_inner(self.span, self.id, meta))
378
- }
+ mk_attr_inner(self.span, self.id, meta)
+ };
379
+ attr.is_sugared_doc = true;
380
+ f(&attr)
381
382
f(self)
383
}
0 commit comments