Open danielsn opened 1 year ago
Please correct-me if I'm wrong. I think the error message is coming from std::result::unwrap_failed()
which is defined here: https://doc.rust-lang.org/src/core/result.rs.html#1791
fn unwrap_failed(msg: &str, error: &dyn fmt::Debug) -> ! {
panic!("{msg}: {error:?}")
}
That said, I really think we should improve this message. It sounds like a bug in Kani not a property failure.
The message I was referring to was this one. Sorry if I was unclear.
Failed Checks: This is a placeholder message; Kani doesn't support message formatted at runtime
File: "/Users/dsn/.rustup/toolchains/nightly-2022-12-11-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/time.rs", line 202, in std::time::Duration::new
Ah, too many of them. :)
Is that this statement? panic!("overflow in Duration::new")
.
I tried this code:
with Kani version: 0.20.0
I expected to see this happen: Kani uses static strings in panic messages
Instead, this happened: explanation
But the panic on line 202 in time.rs is given a static string: https://doc.rust-lang.org/stable/src/core/time.rs.html#202