diff options
| author | Lieselotte <52315535+she3py@users.noreply.github.com> | 2024-02-25 22:22:09 +0100 |
|---|---|---|
| committer | Lieselotte <52315535+she3py@users.noreply.github.com> | 2024-02-25 22:22:09 +0100 |
| commit | a3fce72a27ee41077c3752851ff778f886f0a4fa (patch) | |
| tree | fa1d202e92a49e3cb5c01f548c9ff7ee37a2a4db /compiler/rustc_expand | |
| parent | 8c0b1fcd2914caaf1c3a1071028fb74b70c519e9 (diff) | |
| download | rust-a3fce72a27ee41077c3752851ff778f886f0a4fa.tar.gz rust-a3fce72a27ee41077c3752851ff778f886f0a4fa.zip | |
Add `ast::ExprKind::Dummy`
Diffstat (limited to 'compiler/rustc_expand')
| -rw-r--r-- | compiler/rustc_expand/src/base.rs | 3 |
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)), }) } |
