File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
3030 let kind = match e. kind {
3131 ExprKind :: Box ( ref inner) => hir:: ExprKind :: Box ( self . lower_expr ( inner) ) ,
3232 ExprKind :: Array ( ref exprs) => hir:: ExprKind :: Array ( self . lower_exprs ( exprs) ) ,
33- ExprKind :: ConstBlock ( _) => {
34- unimplemented ! ( ) ;
33+ ExprKind :: ConstBlock ( ref anon_const) => {
34+ let anon_const = self . lower_anon_const ( anon_const) ;
35+ hir:: ExprKind :: ConstBlock ( anon_const)
3536 }
3637 ExprKind :: Repeat ( ref expr, ref count) => {
3738 let expr = self . lower_expr ( expr) ;
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ impl<'a> AstValidator<'a> {
287287 // ```
288288 fn check_expr_within_pat ( & self , expr : & Expr , allow_paths : bool ) {
289289 match expr. kind {
290- ExprKind :: Lit ( ..) | ExprKind :: Err => { }
290+ ExprKind :: Lit ( ..) | ExprKind :: ConstBlock ( .. ) | ExprKind :: Err => { }
291291 ExprKind :: Path ( ..) if allow_paths => { }
292292 ExprKind :: Unary ( UnOp :: Neg , ref inner) if matches ! ( inner. kind, ExprKind :: Lit ( _) ) => { }
293293 _ => self . err_handler ( ) . span_err (
You can’t perform that action at this time.
0 commit comments