提交 a41a87eb 编写于 作者: E Eduard-Mihai Burtescu 提交者: GitHub

Rollup merge of #37644 - nrc:save-derive-span, r=eddyb

save-analysis: don't choke on stripped doc attributes
......@@ -759,7 +759,11 @@ fn docs_for_attrs(attrs: &[Attribute]) -> String {
for attr in attrs {
if attr.name() == doc {
if let Some(ref val) = attr.value_str() {
result.push_str(&strip_doc_comment_decoration(val));
if attr.node.is_sugared_doc {
result.push_str(&strip_doc_comment_decoration(val));
} else {
result.push_str(val);
}
result.push('\n');
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册