aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand/src/builtin_macro.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_expand/src/builtin_macro.rs')
-rw-r--r--crates/ra_hir_expand/src/builtin_macro.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs
index 4adaa9b07..f2bb0bddb 100644
--- a/crates/ra_hir_expand/src/builtin_macro.rs
+++ b/crates/ra_hir_expand/src/builtin_macro.rs
@@ -155,14 +155,11 @@ fn compile_error_expand(
155 tt: &tt::Subtree, 155 tt: &tt::Subtree,
156) -> Result<tt::Subtree, mbe::ExpandError> { 156) -> Result<tt::Subtree, mbe::ExpandError> {
157 if tt.count() == 1 { 157 if tt.count() == 1 {
158 match &tt.token_trees[0] { 158 if let tt::TokenTree::Leaf(tt::Leaf::Literal(it)) = &tt.token_trees[0] {
159 tt::TokenTree::Leaf(tt::Leaf::Literal(it)) => { 159 let s = it.text.as_str();
160 let s = it.text.as_str(); 160 if s.contains('"') {
161 if s.contains('"') { 161 return Ok(quote! { loop { #it }});
162 return Ok(quote! { loop { #it }});
163 }
164 } 162 }
165 _ => {}
166 }; 163 };
167 } 164 }
168 165