diff options
| author | bors <bors@rust-lang.org> | 2020-12-24 11:30:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-24 11:30:24 +0000 |
| commit | 2acf6ee6d2ab3acf3f4d2117591ac1143c8232fe (patch) | |
| tree | 65b8f8eb157cb2c6125019027b172e2f33a8f866 /src/librustdoc | |
| parent | c34c015fe2710caf53ba7ae9d1644f9ba65a6f74 (diff) | |
| parent | 64afdedfb87d471dcf1b757cea5f4b0b570176c1 (diff) | |
| download | rust-2acf6ee6d2ab3acf3f4d2117591ac1143c8232fe.tar.gz rust-2acf6ee6d2ab3acf3f4d2117591ac1143c8232fe.zip | |
Auto merge of #80295 - GuillaumeGomez:beautify-rework, r=petrochenkov
Rework beautify_doc_string so that it returns a Symbol instead of a String This commit comes from https://github.com/rust-lang/rust/pull/80261, the goal here is to inspect the impact on performance of this change on its own. The idea of rewriting `beautify_doc_string` is to not go through `String` if we don't need to update the doc comment to be able to keep the original `Symbol` and also to have better performance. r? `@jyn514`
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/clean/types.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 9b2003911a7..dd818a643ef 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -621,7 +621,7 @@ impl Attributes { let clean_attr = |(attr, parent_module): (&ast::Attribute, _)| { if let Some(value) = attr.doc_str() { trace!("got doc_str={:?}", value); - let value = beautify_doc_string(value); + let value = beautify_doc_string(value).to_string(); let kind = if attr.is_doc_comment() { DocFragmentKind::SugaredDoc } else { |
