File tree 2 files changed +14
-12
lines changed
2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -496,9 +496,10 @@ macro_rules! r#try {
496
496
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
497
497
#[ cfg_attr( not( test) , rustc_diagnostic_item = "write_macro" ) ]
498
498
macro_rules! write {
499
- ( $dst: expr, $( $arg: tt) * ) => {
500
- $dst. write_fmt( $crate:: format_args!( $( $arg) * ) )
501
- } ;
499
+ ( $dst: expr, $( $arg: tt) * ) => { {
500
+ let result = $dst. write_fmt( $crate:: format_args!( $( $arg) * ) ) ;
501
+ result
502
+ } } ;
502
503
}
503
504
504
505
/// Write formatted data into a buffer, with a newline appended.
@@ -553,9 +554,10 @@ macro_rules! writeln {
553
554
( $dst: expr $( , ) ?) => {
554
555
$crate:: write!( $dst, "\n " )
555
556
} ;
556
- ( $dst: expr, $( $arg: tt) * ) => {
557
- $dst. write_fmt( $crate:: format_args_nl!( $( $arg) * ) )
558
- } ;
557
+ ( $dst: expr, $( $arg: tt) * ) => { {
558
+ let result = $dst. write_fmt( $crate:: format_args_nl!( $( $arg) * ) ) ;
559
+ result
560
+ } } ;
559
561
}
560
562
561
563
/// Indicates unreachable code.
Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ macro_rules! panic {
62
62
#[ cfg_attr( not( test) , rustc_diagnostic_item = "print_macro" ) ]
63
63
#[ allow_internal_unstable( print_internals) ]
64
64
macro_rules! print {
65
- ( $( $arg: tt) * ) => {
66
- $crate:: io:: _print( $crate:: format_args!( $( $arg) * ) )
67
- } ;
65
+ ( $( $arg: tt) * ) => { {
66
+ $crate:: io:: _print( $crate:: format_args!( $( $arg) * ) ) ;
67
+ } } ;
68
68
}
69
69
70
70
/// Prints to the standard output, with a newline.
@@ -133,9 +133,9 @@ macro_rules! println {
133
133
#[ cfg_attr( not( test) , rustc_diagnostic_item = "eprint_macro" ) ]
134
134
#[ allow_internal_unstable( print_internals) ]
135
135
macro_rules! eprint {
136
- ( $( $arg: tt) * ) => {
137
- $crate:: io:: _eprint( $crate:: format_args!( $( $arg) * ) )
138
- } ;
136
+ ( $( $arg: tt) * ) => { {
137
+ $crate:: io:: _eprint( $crate:: format_args!( $( $arg) * ) ) ;
138
+ } } ;
139
139
}
140
140
141
141
/// Prints to the standard error, with a newline.
You can’t perform that action at this time.
0 commit comments