Skip to content

Commit d5eec65

Browse files
committed
Use the explicit error constant instead of fake dummies
1 parent 0bb367e commit d5eec65

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_mir_build/src/thir/cx

1 file changed

+2
-2
lines changed

compiler/rustc_mir_build/src/thir/cx/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ impl<'thir, 'tcx> Cx<'thir, 'tcx> {
6868
// FIXME(#31407) this is only necessary because float parsing is buggy
6969
self.tcx.sess.span_err(sp, "could not evaluate float literal (see issue #31407)");
7070
// create a dummy value and continue compiling
71-
Const::from_bits(self.tcx, 0, self.param_env.and(ty))
71+
self.tcx.const_error(ty)
7272
}
7373
Err(LitToConstError::Reported) => {
7474
// create a dummy value and continue compiling
75-
Const::from_bits(self.tcx, 0, self.param_env.and(ty))
75+
self.tcx.const_error(ty)
7676
}
7777
Err(LitToConstError::TypeError) => bug!("const_eval_literal: had type error"),
7878
}

0 commit comments

Comments
 (0)