Closed
Description
fn main() {
let _ = -(-0.0);
}
error: this expression will panic at runtime
--> test.rs:2:13
|
2 | let _ = -(-0.0);
| ^^^^^^^ attempt to negate with overflow
|
= note: `#[deny(const_err)]` on by default
error: aborting due to previous error
Meta
rustc 1.39.0-nightly (fba38ac27 2019-08-31)
binary: rustc
commit-hash: fba38ac27e2ade309f4c2504a6d6cd3556972a28
commit-date: 2019-08-31
host: x86_64-unknown-linux-gnu
release: 1.39.0-nightly
LLVM version: 9.0
Metadata
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Lints (warnings about flaws in source code) such as unused_mut.Category: This is a bug.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.