Rework beautify_doc_string so that it returns a Symbol instead of a String

This commit is contained in:
Guillaume Gomez 2020-12-20 23:37:24 +01:00
parent 75e1acb63a
commit 64afdedfb8
4 changed files with 39 additions and 37 deletions

View file

@ -825,7 +825,7 @@ impl<'tcx> SaveContext<'tcx> {
for attr in attrs {
if let Some(val) = attr.doc_str() {
// FIXME: Should save-analysis beautify doc strings itself or leave it to users?
result.push_str(&beautify_doc_string(val));
result.push_str(&beautify_doc_string(val).as_str());
result.push('\n');
} else if self.tcx.sess.check_name(attr, sym::doc) {
if let Some(meta_list) = attr.meta_item_list() {