File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/tools/rust-analyzer/crates/test-utils/src Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 7070//! tuple:
7171//! unpin: sized
7272//! unsize: sized
73+ //! write: fmt
7374//! todo: panic
7475//! unimplemented: panic
7576//! column:
@@ -1769,6 +1770,26 @@ mod macros {
17691770 }
17701771 // endregion:panic
17711772
1773+ // region:write
1774+ #[ macro_export]
1775+ macro_rules! write {
1776+ ( $dst: expr, $( $arg: tt) * ) => {
1777+ $dst. write_fmt( $crate:: format_args!( $( $arg) * ) )
1778+ } ;
1779+ }
1780+
1781+ #[ macro_export]
1782+ #[ allow_internal_unstable( format_args_nl) ]
1783+ macro_rules! writeln {
1784+ ( $dst: expr $( , ) ?) => {
1785+ $crate:: write!( $dst, "\n " )
1786+ } ;
1787+ ( $dst: expr, $( $arg: tt) * ) => {
1788+ $dst. write_fmt( $crate:: format_args_nl!( $( $arg) * ) )
1789+ } ;
1790+ }
1791+ // endregion:write
1792+
17721793 // region:assert
17731794 #[ macro_export]
17741795 #[ rustc_builtin_macro]
You can’t perform that action at this time.
0 commit comments