Use the explicit error constant instead of fake dummies
This commit is contained in:
parent
0bb367e070
commit
d5eec653c0
1 changed files with 2 additions and 2 deletions
|
@ -68,11 +68,11 @@ impl<'thir, 'tcx> Cx<'thir, 'tcx> {
|
|||
// FIXME(#31407) this is only necessary because float parsing is buggy
|
||||
self.tcx.sess.span_err(sp, "could not evaluate float literal (see issue #31407)");
|
||||
// create a dummy value and continue compiling
|
||||
Const::from_bits(self.tcx, 0, self.param_env.and(ty))
|
||||
self.tcx.const_error(ty)
|
||||
}
|
||||
Err(LitToConstError::Reported) => {
|
||||
// create a dummy value and continue compiling
|
||||
Const::from_bits(self.tcx, 0, self.param_env.and(ty))
|
||||
self.tcx.const_error(ty)
|
||||
}
|
||||
Err(LitToConstError::TypeError) => bug!("const_eval_literal: had type error"),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue