File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Expand file tree Collapse file tree 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 {
496496#[ stable( feature = "rust1" , since = "1.0.0" ) ]
497497#[ cfg_attr( not( test) , rustc_diagnostic_item = "write_macro" ) ]
498498macro_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+ } } ;
502503}
503504
504505/// Write formatted data into a buffer, with a newline appended.
@@ -553,9 +554,10 @@ macro_rules! writeln {
553554 ( $dst: expr $( , ) ?) => {
554555 $crate:: write!( $dst, "\n " )
555556 } ;
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+ } } ;
559561}
560562
561563/// Indicates unreachable code.
Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ macro_rules! panic {
6262#[ cfg_attr( not( test) , rustc_diagnostic_item = "print_macro" ) ]
6363#[ allow_internal_unstable( print_internals) ]
6464macro_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+ } } ;
6868}
6969
7070/// Prints to the standard output, with a newline.
@@ -133,9 +133,9 @@ macro_rules! println {
133133#[ cfg_attr( not( test) , rustc_diagnostic_item = "eprint_macro" ) ]
134134#[ allow_internal_unstable( print_internals) ]
135135macro_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+ } } ;
139139}
140140
141141/// Prints to the standard error, with a newline.
You can’t perform that action at this time.
0 commit comments