Closed
Description
Later versions of rust mistake macros like https://crates.io/crates/contracts requires
as a panic message.
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=babeae07316ceb37dd7291ff889e9ea3
<code>
The current output is:
warning: panic message contains braces
--> src/main.rs:4:16
|
4 | #[requires(key.starts_with('{'))]
| ^^^
|
= note: `#[warn(non_fmt_panic)]` on by default
= note: this message is not used as a format string, but will be in Rust 2021
help: add a "{}" format string to use the message literally
|
4 | #[requires("{}", key.starts_with('{'))]
| ^^^^^
Ideally the output should look like:
Nothing, it's not a panic message, it's an expression.
<proposed output>