@@ -71,12 +71,12 @@ running:
71
71
cargo fix --edition
72
72
```
73
73
74
- Should you choose to or need to manually migrate, you'll need to update all panic invocations to either use the same
75
- formatting as ` println ` currently does or use
74
+ Should you choose or need to manually migrate, you'll need to update all panic invocations to either use the same
75
+ formatting as ` println ` or use ` std::panic::panic_any ` to panic with non-string data.
76
76
77
- For example, in the case of ` panic!(MyStruct) ` , you'll need to either convert to using ` std::panic::panic_any ` (note
78
- that this is a function not a macro).
77
+ For example, in the case of ` panic!(MyStruct) ` , you'll need to convert to using ` std::panic::panic_any ` (note
78
+ that this is a function not a macro): ` std::panic::panic_any(MyStruct) ` .
79
79
80
- In the case of panic messages that include curly braces but no arguments (e.g., `panic!("Some curlies: {}")), you'll
81
- need to print the literal string by either using the same syntax as ` println! ` (i.e., ` panic!("{}", Some curlies: {}") ` )
82
- or by escaping them (i.e., ` panic!("Some curlies: {{}}") ` ).
80
+ In the case of panic messages that include curly braces but the wrong number of arguments (e.g., ` panic!("Some curlies: {}") ` ),
81
+ you can panic with the string literal by either using the same syntax as ` println! ` (i.e., ` panic!("{}", " Some curlies: {}") ` )
82
+ or by escaping the curly braces (i.e., ` panic!("Some curlies: {{}}") ` ).
0 commit comments