Skip to content

Commit fb906c4

Browse files
committed
fix(const_eval): break from checking const type after walking to function pointer
1 parent e3811a7 commit fb906c4

File tree

1 file changed

+1
-0
lines changed
  • compiler/rustc_const_eval/src/transform/check_consts

1 file changed

+1
-0
lines changed

compiler/rustc_const_eval/src/transform/check_consts/check.rs

+1
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
356356
};
357357

358358
match *ty.kind() {
359+
ty::FnPtr(_) => break,
359360
ty::Ref(_, _, hir::Mutability::Mut) => self.check_op(ops::ty::MutRef(kind)),
360361
_ => {}
361362
}

0 commit comments

Comments
 (0)