about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/string-from_ut.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-31 07:00:42 +0100
committerGitHub <noreply@github.com>2022-01-31 07:00:42 +0100
commitc1e2948c21398d98ada51f27bd9fa3ada439e03d (patch)
tree776941fc8495bc55eef89511bec16d34b9a3c431 /src/test/rustdoc-js-std/string-from_ut.js
parent8fd2ff57fa936f1fb24afe1f452e8d2ef9b485d6 (diff)
parent858d6a071199b30ea95c744895f61f93ad188ffb (diff)
downloadrust-c1e2948c21398d98ada51f27bd9fa3ada439e03d.tar.gz
rust-c1e2948c21398d98ada51f27bd9fa3ada439e03d.zip
Rollup merge of #93461 - dtolnay:fmtyield, r=davidtwco
Accommodate yield points in the format_args expansion

Fixes #93274.

For the case `println!("{} {:?}", "", async {}.await)` in the issue, the expansion before:

```rust
::std::io::_print(
    ::core::fmt::Arguments::new_v1(
        &["", " ", "\n"],
        &[
            ::core::fmt::ArgumentV1::new(&"", ::core::fmt::Display::fmt),
            ::core::fmt::ArgumentV1::new(&async {}.await, ::core::fmt::Debug::fmt),
        ],
    ),
);
```

After:

```rust
::std::io::_print(
    ::core::fmt::Arguments::new_v1(
        &["", " ", "\n"],
        &match (&"", &async {}.await) {
            _args => [
                ::core::fmt::ArgumentV1::new(_args.0, ::core::fmt::Display::fmt),
                ::core::fmt::ArgumentV1::new(_args.1, ::core::fmt::Debug::fmt),
            ],
        },
    ),
);
```
Diffstat (limited to 'src/test/rustdoc-js-std/string-from_ut.js')
0 files changed, 0 insertions, 0 deletions