Auto merge of #50841 - oli-obk:promote_errors_to_panics, r=eddyb
Don't lint numeric overflows in promoteds in release mode r? @eddyb mitigates #50814
This commit is contained in:
commit
22c25dd737
9 changed files with 134 additions and 34 deletions
|
@ -413,10 +413,10 @@ impl<'a, 'tcx> FunctionCx<'a, 'tcx> {
|
|||
.unwrap_or_else(|err| {
|
||||
match constant.literal {
|
||||
mir::Literal::Promoted { .. } => {
|
||||
// don't report errors inside promoteds, just warnings.
|
||||
// FIXME: generate a panic here
|
||||
},
|
||||
mir::Literal::Value { .. } => {
|
||||
err.report(bx.tcx(), constant.span, "const operand")
|
||||
err.report(bx.tcx(), constant.span, "const operand");
|
||||
},
|
||||
}
|
||||
// We've errored, so we don't have to produce working code.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue