@@ -28,13 +28,13 @@ pub macro panic_2015 {
28
28
$crate:: panicking:: panic ( $msg)
29
29
) ,
30
30
// Use `panic_str` instead of `panic_display::<&str>` for non_fmt_panic lint.
31
- ( $msg: expr $( , ) ?) => (
32
- $crate:: panicking:: panic_str ( $msg)
33
- ) ,
31
+ ( $msg: expr $( , ) ?) => ( {
32
+ $crate:: panicking:: panic_str ( $msg) ;
33
+ } ) ,
34
34
// Special-case the single-argument case for const_panic.
35
- ( "{}" , $arg: expr $( , ) ?) => (
36
- $crate:: panicking:: panic_display ( & $arg)
37
- ) ,
35
+ ( "{}" , $arg: expr $( , ) ?) => ( {
36
+ $crate:: panicking:: panic_display ( & $arg) ;
37
+ } ) ,
38
38
( $fmt: expr, $( $arg: tt) +) => ( {
39
39
// Semicolon to prevent temporaries inside the formatting machinery from
40
40
// being considered alive in the caller after the panic_fmt call.
@@ -52,9 +52,9 @@ pub macro panic_2021 {
52
52
$crate:: panicking:: panic ( "explicit panic" )
53
53
) ,
54
54
// Special-case the single-argument case for const_panic.
55
- ( "{}" , $arg: expr $( , ) ?) => (
56
- $crate:: panicking:: panic_display ( & $arg)
57
- ) ,
55
+ ( "{}" , $arg: expr $( , ) ?) => ( {
56
+ $crate:: panicking:: panic_display ( & $arg) ;
57
+ } ) ,
58
58
( $( $t: tt) +) => ( {
59
59
// Semicolon to prevent temporaries inside the formatting machinery from
60
60
// being considered alive in the caller after the panic_fmt call.
@@ -73,9 +73,9 @@ pub macro unreachable_2015 {
73
73
) ,
74
74
// Use of `unreachable_display` for non_fmt_panic lint.
75
75
// NOTE: the message ("internal error ...") is embedded directly in unreachable_display
76
- ( $msg: expr $( , ) ?) => (
77
- $crate:: panicking:: unreachable_display ( & $msg)
78
- ) ,
76
+ ( $msg: expr $( , ) ?) => ( {
77
+ $crate:: panicking:: unreachable_display ( & $msg) ;
78
+ } ) ,
79
79
( $fmt: expr, $( $arg: tt) * ) => (
80
80
$crate:: panic!( $crate :: concat!( "internal error: entered unreachable code: " , $fmt) , $( $arg) * )
81
81
) ,
0 commit comments