aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs2
-rw-r--r--crates/ra_mbe/src/tests.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs
index 63ca54cc2..73a0780da 100644
--- a/crates/ra_mbe/src/syntax_bridge.rs
+++ b/crates/ra_mbe/src/syntax_bridge.rs
@@ -135,7 +135,7 @@ fn doc_comment_text(comment: &ast::Comment) -> SmolStr {
135 135
136 // Quote the string 136 // Quote the string
137 // Note that `tt::Literal` expect an escaped string 137 // Note that `tt::Literal` expect an escaped string
138 let text = format!("\"{}\"", text.escape_default()); 138 let text = format!("{:?}", text.escape_default().to_string());
139 text.into() 139 text.into()
140} 140}
141 141
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs
index 897f76be1..c487bbbd4 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/ra_mbe/src/tests.rs
@@ -888,7 +888,7 @@ fn test_meta_doc_comments() {
888 MultiLines Doc 888 MultiLines Doc
889 */ 889 */
890 }"#, 890 }"#,
891 "# [doc = \" Single Line Doc 1\"] # [doc = \" \\n MultiLines Doc\\n \"] fn bar () {}", 891 "# [doc = \" Single Line Doc 1\"] # [doc = \" \\\\n MultiLines Doc\\\\n \"] fn bar () {}",
892 ); 892 );
893} 893}
894 894