-
-
Save m-ou-se/7486a9b15688b2e7a9a28690b687efdb to your computer and use it in GitHub Desktop.
format_args!() expansion example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(prelude_import)] | |
#![no_std] | |
#[prelude_import] | |
use ::std::prelude::rust_2015::*; | |
#[macro_use] | |
extern crate std; | |
fn main() { | |
{ | |
::std::io::_print(::core::fmt::Arguments::new_v1_formatted(&["", " ", | |
" ", " ", "\n"], | |
&match (&123,) { | |
args => | |
[::core::fmt::ArgumentV1::new_display(args.0), | |
::core::fmt::ArgumentV1::new_octal(args.0), | |
::core::fmt::ArgumentV1::new_lower_hex(args.0)], | |
}, | |
&[::core::fmt::rt::v1::Argument { | |
position: 0usize, | |
format: ::core::fmt::rt::v1::FormatSpec { | |
fill: ' ', | |
align: ::core::fmt::rt::v1::Alignment::Unknown, | |
flags: 0u32, | |
precision: ::core::fmt::rt::v1::Count::Implied, | |
width: ::core::fmt::rt::v1::Count::Implied, | |
}, | |
}, | |
::core::fmt::rt::v1::Argument { | |
position: 0usize, | |
format: ::core::fmt::rt::v1::FormatSpec { | |
fill: ' ', | |
align: ::core::fmt::rt::v1::Alignment::Unknown, | |
flags: 0u32, | |
precision: ::core::fmt::rt::v1::Count::Implied, | |
width: ::core::fmt::rt::v1::Count::Implied, | |
}, | |
}, | |
::core::fmt::rt::v1::Argument { | |
position: 1usize, | |
format: ::core::fmt::rt::v1::FormatSpec { | |
fill: ' ', | |
align: ::core::fmt::rt::v1::Alignment::Unknown, | |
flags: 0u32, | |
precision: ::core::fmt::rt::v1::Count::Implied, | |
width: ::core::fmt::rt::v1::Count::Implied, | |
}, | |
}, | |
::core::fmt::rt::v1::Argument { | |
position: 2usize, | |
format: ::core::fmt::rt::v1::FormatSpec { | |
fill: ' ', | |
align: ::core::fmt::rt::v1::Alignment::Unknown, | |
flags: 0u32, | |
precision: ::core::fmt::rt::v1::Count::Implied, | |
width: ::core::fmt::rt::v1::Count::Implied, | |
}, | |
}], unsafe { ::core::fmt::UnsafeArg::new() })); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you happen to have the initial code this was expanded from?