about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/expr.rs
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_ast_lowering/src/expr.rs
parent8c0b1fcd2914caaf1c3a1071028fb74b70c519e9 (diff)
downloadrust-a3fce72a27ee41077c3752851ff778f886f0a4fa.tar.gz
rust-a3fce72a27ee41077c3752851ff778f886f0a4fa.zip
Add `ast::ExprKind::Dummy`
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
-rw-r--r--compiler/rustc_ast_lowering/src/expr.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs
index aafa99b3aa6..5d33a7a9142 100644
--- a/compiler/rustc_ast_lowering/src/expr.rs
+++ b/compiler/rustc_ast_lowering/src/expr.rs
@@ -14,6 +14,7 @@ use rustc_ast::*;
 use rustc_data_structures::stack::ensure_sufficient_stack;
 use rustc_hir as hir;
 use rustc_hir::def::{DefKind, Res};
+use rustc_middle::span_bug;
 use rustc_session::errors::report_lit_error;
 use rustc_span::source_map::{respan, Spanned};
 use rustc_span::symbol::{kw, sym, Ident, Symbol};
@@ -331,6 +332,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
                 ExprKind::Err => {
                     hir::ExprKind::Err(self.dcx().span_delayed_bug(e.span, "lowered ExprKind::Err"))
                 }
+
+                ExprKind::Dummy => {
+                    span_bug!(e.span, "lowered ExprKind::Dummy")
+                }
+
                 ExprKind::Try(sub_expr) => self.lower_expr_try(e.span, sub_expr),
 
                 ExprKind::Paren(_) | ExprKind::ForLoop { .. } => {