aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_expand')
-rw-r--r--crates/hir_expand/src/builtin_macro.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/hir_expand/src/builtin_macro.rs b/crates/hir_expand/src/builtin_macro.rs
index 16c3c4d69..44a5556b6 100644
--- a/crates/hir_expand/src/builtin_macro.rs
+++ b/crates/hir_expand/src/builtin_macro.rs
@@ -271,10 +271,7 @@ fn compile_error_expand(
271 let text = it.text.as_str(); 271 let text = it.text.as_str();
272 if text.starts_with('"') && text.ends_with('"') { 272 if text.starts_with('"') && text.ends_with('"') {
273 // FIXME: does not handle raw strings 273 // FIXME: does not handle raw strings
274 mbe::ExpandError::Other(format!( 274 mbe::ExpandError::Other(text[1..text.len() - 1].to_string())
275 "`compile_error!` called: {}",
276 &text[1..text.len() - 1]
277 ))
278 } else { 275 } else {
279 mbe::ExpandError::BindingError("`compile_error!` argument must be a string".into()) 276 mbe::ExpandError::BindingError("`compile_error!` argument must be a string".into())
280 } 277 }