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
Auto merge of #24370 - pnkfelix:fsk-unary-panic, r=<try>
Ensure a sole string-literal passed to `panic!` is not a fmt string.
To accomplish this, adds `ensure_not_fmt_string_literal!` macro that will fail the compile if its expression argument is a fmt string literal.
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