diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-01-18 16:56:16 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-01-19 11:18:17 +0100 |
| commit | 2938be612dce1d2976bebf80812d713257a3b501 (patch) | |
| tree | 5233b516f4b68779c110c4d9dcb7538d39e5b7fe /compiler/rustc_save_analysis/src | |
| parent | 7531d2fdd49966d83830a7b4596c95587b1e9573 (diff) | |
| download | rust-2938be612dce1d2976bebf80812d713257a3b501.tar.gz rust-2938be612dce1d2976bebf80812d713257a3b501.zip | |
Correctly handle starts in block doc comments
Diffstat (limited to 'compiler/rustc_save_analysis/src')
| -rw-r--r-- | compiler/rustc_save_analysis/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_save_analysis/src/lib.rs b/compiler/rustc_save_analysis/src/lib.rs index 21cb93cc5f4..b95fe1b0549 100644 --- a/compiler/rustc_save_analysis/src/lib.rs +++ b/compiler/rustc_save_analysis/src/lib.rs @@ -821,9 +821,9 @@ impl<'tcx> SaveContext<'tcx> { let mut result = String::new(); for attr in attrs { - if let Some(val) = attr.doc_str() { + if let Some((val, kind)) = attr.doc_str_and_comment_kind() { // FIXME: Should save-analysis beautify doc strings itself or leave it to users? - result.push_str(beautify_doc_string(val).as_str()); + result.push_str(beautify_doc_string(val, kind).as_str()); result.push('\n'); } } |
