diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2016-11-09 20:51:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-09 20:51:19 +0200 |
| commit | a41a87eb747245f3de509841af5727845810605a (patch) | |
| tree | 035f42541c46802baa18a9a8de5f440350c56748 /src | |
| parent | 3292f407e750c2233bba22153a4216b16cc1ae75 (diff) | |
| parent | 4b20221e14082919f4909b7b1ef6257f9d263362 (diff) | |
Rollup merge of #37644 - nrc:save-derive-span, r=eddyb
save-analysis: don't choke on stripped doc attributes
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_save_analysis/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index 9103b90d7d2..e1b67d211a3 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -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'); } } |
