Skip to content

Commit 4cbcb09

Browse files
committed
handle ExprKind::NeverToAny
1 parent fc63e9a commit 4cbcb09

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_trait_selection/src/traits/const_evaluatable.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,6 @@ impl<'a, 'tcx> AbstractConstBuilder<'a, 'tcx> {
418418
let arg = self.recurse_build(source)?;
419419
self.add_node(Node::Cast(arg, node.ty), node.span)
420420
},
421-
// never can arise even without panic/fail to terminate
422-
&ExprKind::NeverToAny { source } => todo!(),
423421

424422
// FIXME(generic_const_exprs) we want to support these
425423
ExprKind::AddressOf { .. }
@@ -428,6 +426,7 @@ impl<'a, 'tcx> AbstractConstBuilder<'a, 'tcx> {
428426
| ExprKind::Repeat { .. }
429427
| ExprKind::Array { .. }
430428
| ExprKind::Block { .. }
429+
| ExprKind::NeverToAny { .. } // I dont think we can get this without adt construction
431430
| ExprKind::Tuple { .. }
432431
| ExprKind::Index { .. }
433432
| ExprKind::Field { .. }

0 commit comments

Comments
 (0)