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> {
30
30
let kind = match e. kind {
31
31
ExprKind :: Box ( ref inner) => hir:: ExprKind :: Box ( self . lower_expr ( inner) ) ,
32
32
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)
35
36
}
36
37
ExprKind :: Repeat ( ref expr, ref count) => {
37
38
let expr = self . lower_expr ( expr) ;
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ impl<'a> AstValidator<'a> {
287
287
// ```
288
288
fn check_expr_within_pat ( & self , expr : & Expr , allow_paths : bool ) {
289
289
match expr. kind {
290
- ExprKind :: Lit ( ..) | ExprKind :: Err => { }
290
+ ExprKind :: Lit ( ..) | ExprKind :: ConstBlock ( .. ) | ExprKind :: Err => { }
291
291
ExprKind :: Path ( ..) if allow_paths => { }
292
292
ExprKind :: Unary ( UnOp :: Neg , ref inner) if matches ! ( inner. kind, ExprKind :: Lit ( _) ) => { }
293
293
_ => self . err_handler ( ) . span_err (
You can’t perform that action at this time.
0 commit comments