Skip to content

Commit

Permalink
Rollup merge of rust-lang#37644 - nrc:save-derive-span, r=eddyb
Browse files Browse the repository at this point in the history
save-analysis: don't choke on stripped doc attributes
  • Loading branch information
eddyb authored Nov 9, 2016
2 parents 3292f40 + 4b20221 commit a41a87e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustc_save_analysis/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
Expand Down

0 comments on commit a41a87e

Please sign in to comment.