about summary refs log tree commit diff
path: root/compiler/rustc_expand
diff options
context:
space:
mode:
authorLieselotte <52315535+she3py@users.noreply.github.com>2024-02-25 22:22:09 +0100
committerLieselotte <52315535+she3py@users.noreply.github.com>2024-02-25 22:22:09 +0100
commita3fce72a27ee41077c3752851ff778f886f0a4fa (patch)
treefa1d202e92a49e3cb5c01f548c9ff7ee37a2a4db /compiler/rustc_expand
parent8c0b1fcd2914caaf1c3a1071028fb74b70c519e9 (diff)
downloadrust-a3fce72a27ee41077c3752851ff778f886f0a4fa.tar.gz
rust-a3fce72a27ee41077c3752851ff778f886f0a4fa.zip
Add `ast::ExprKind::Dummy`
Diffstat (limited to 'compiler/rustc_expand')
-rw-r--r--compiler/rustc_expand/src/base.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs
index 1c8d18bec65..762d6745341 100644
--- a/compiler/rustc_expand/src/base.rs
+++ b/compiler/rustc_expand/src/base.rs
@@ -1279,6 +1279,9 @@ pub fn expr_to_spanned_string<'a>(
             _ => Some((cx.dcx().struct_span_err(expr.span, err_msg), false)),
         },
         ast::ExprKind::Err => None,
+        ast::ExprKind::Dummy => {
+            cx.dcx().span_bug(expr.span, "tried to get a string literal from `ExprKind::Dummy`")
+        }
         _ => Some((cx.dcx().struct_span_err(expr.span, err_msg), false)),
     })
 }