You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure a sole string-literal passes to panic! is not a fmt string.
To accomplish this, adds `ensure_not_fmt_string_literal!` macro that
will fail the compile if its argument is a fmt string literal.
`ensure_not_fmt_string_literal!` takes a name along with expr; this
allows for better error messages at its usage sites (like `panic!`).
----
Since this is making a certain kind of use of `panic!` illegal, it
is a:
[breaking-change]
In particular, a panic like this:
```rust
panic!("Is it stringified code: { or is it a ill-formed fmt arg? }");
```
must be rewritten; one easy rewrite is to add parentheses:
```rust
panic!(("Is it stringified code: { or is it a ill-formed fmt arg? }"));
```
----
Fix#22932.
0 commit comments