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 | ec00cf80a306abe59e99ffdb4bfcc55b022fc5b7 (patch) | |
| tree | 91fe3ecdd29046ff9d88cb16703d773372e583e5 /src/test/rustdoc-js-std/string-from_ut.js | |
| parent | 5a25c0e6e95fb8dc7138b9028c8c76698b637449 (diff) | |
| parent | c4228242753837ce2c78c78c644d9dbd1e5b2540 (diff) | |
| download | rust-ec00cf80a306abe59e99ffdb4bfcc55b022fc5b7.tar.gz rust-ec00cf80a306abe59e99ffdb4bfcc55b022fc5b7.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/rustdoc-js-std/string-from_ut.js')
0 files changed, 0 insertions, 0 deletions
