Skip to content

Commit 7ceab2c

Browse files
Reference the improvement of 2021 panic!
Co-authored-by: Mark Rousskov <[email protected]>
1 parent 166987c commit 7ceab2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

posts/2022-01-13-Rust-1.58.0.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ first, or use the older `name = expression` style of formatting arguments.
6363
This feature works in all macros accepting format strings. However, one corner
6464
case is the `panic!` macro in 2015 and 2018 editions, where `panic!("{ident}")`
6565
is still treated as an unformatted string -- the compiler will warn about this
66-
not having the intended effect.
66+
not having the intended effect. Due to the 2021 edition's update of panic
67+
macros for [improved consistency], this works as expected in 2021 `panic!`.
68+
69+
[improved consistency]: https://doc.rust-lang.org/stable/edition-guide/rust-2021/panic-macro-consistency.html
6770

6871
### Reduced Windows `Command` search path
6972

0 commit comments

Comments
 (0)