diff options
| author | bors <bors@rust-lang.org> | 2022-01-21 06:20:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-21 06:20:18 +0000 |
| commit | 0bcacb391b28460f5a50fd627f01f670dfcfc7cc (patch) | |
| tree | efe7eacd74114713b277589bdda6716bd4e59e25 /src/test/codegen/async-fn-debug.rs | |
| parent | 523be2e05da322daaecf1ecc8f2c0d625f5f46e3 (diff) | |
| parent | 7ee21e3de115e086061e5fdc5729c4e41969def9 (diff) | |
| download | rust-0bcacb391b28460f5a50fd627f01f670dfcfc7cc.tar.gz rust-0bcacb391b28460f5a50fd627f01f670dfcfc7cc.zip | |
Auto merge of #91359 - dtolnay:args, r=Mark-Simulacrum
Emit simpler code from format_args
I made this PR so that `cargo expand` dumps a less overwhelming amount of formatting-related code.
<br>
`println!("rust")` **Before:**
```rust
{
::std::io::_print(::core::fmt::Arguments::new_v1(&["rust\n"],
&match () {
_args => [],
}));
};
```
**After:**
```rust
{ ::std::io::_print(::core::fmt::Arguments::new_v1(&["rust\n"], &[])); };
```
`println!("{}", x)` **Before:**
```rust
{
::std::io::_print(::core::fmt::Arguments::new_v1(
&["", "\n"],
&match (&x,) {
_args => [::core::fmt::ArgumentV1::new(
_args.0,
::core::fmt::Display::fmt,
)],
},
));
};
```
**After:**
```rust
{
::std::io::_print(::core::fmt::Arguments::new_v1(
&["", "\n"],
&[::core::fmt::ArgumentV1::new(&x, ::core::fmt::Display::fmt)],
));
};
```
Diffstat (limited to 'src/test/codegen/async-fn-debug.rs')
0 files changed, 0 insertions, 0 deletions
