about summary refs log tree commit diff
path: root/src/librustc_ast_lowering/expr.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-03-21 02:38:48 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2020-03-21 22:18:57 +0100
commite0403bcde362ec85cbc2ca2a7bbf2ef6fecefcfa (patch)
tree94b2d7775c93c896968eae35112d484faefc4f92 /src/librustc_ast_lowering/expr.rs
parent0f68ab03c3dd1df24063dcf8fc84cf56fa83a27b (diff)
downloadrust-e0403bcde362ec85cbc2ca2a7bbf2ef6fecefcfa.tar.gz
rust-e0403bcde362ec85cbc2ca2a7bbf2ef6fecefcfa.zip
lowering: bug! -> panic!
Diffstat (limited to 'src/librustc_ast_lowering/expr.rs')
-rw-r--r--src/librustc_ast_lowering/expr.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc_ast_lowering/expr.rs b/src/librustc_ast_lowering/expr.rs
index a212f0a7107..239dec9e974 100644
--- a/src/librustc_ast_lowering/expr.rs
+++ b/src/librustc_ast_lowering/expr.rs
@@ -1,6 +1,5 @@
 use super::{ImplTraitContext, LoweringContext, ParamMode, ParenthesizedGenericArgs};
 
-use rustc::bug;
 use rustc_ast::ast::*;
 use rustc_ast::attr;
 use rustc_ast::ptr::P as AstP;
@@ -757,7 +756,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
                 Some(movability)
             }
             Some(hir::GeneratorKind::Async(_)) => {
-                bug!("non-`async` closure body turned `async` during lowering");
+                panic!("non-`async` closure body turned `async` during lowering");
             }
             None => {
                 if movability == Movability::Static {