rust/compiler/rustc_builtin_macros/src
Matthias Krüger c1e2948c21
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),
            ],
        },
    ),
);
```
2022-01-31 07:00:42 +01:00
..
deriving Remove redundant [..]s 2021-12-09 00:01:29 +01:00
format_foreign update tests 2021-12-31 12:51:27 -05:00
asm.rs Auto merge of #92816 - tmiasko:rm-llvm-asm, r=Amanieu 2022-01-17 09:40:29 +00:00
assert.rs Use correct edition for panic in [debug_]assert!() etc. 2021-10-07 14:27:08 +02:00
cfg_accessible.rs expand: Tell built-in macros whether we are currently in forced expansion mode 2020-11-19 19:25:20 +03:00
cfg_eval.rs Add a lint for duplicated attributes. 2021-12-15 23:43:13 +01:00
cfg.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
cmdline_attrs.rs Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
compile_error.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
concat_bytes.rs Clarify that repeat count must be positive 2021-12-27 12:31:40 -05:00
concat_idents.rs Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
concat.rs Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
derive.rs Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
env.rs Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
format_foreign.rs [rustc_builtin_macros] add indices to format_foreign::printf::Substitution::Escape 2021-12-31 12:42:15 -05:00
format.rs Rollup merge of #93461 - dtolnay:fmtyield, r=davidtwco 2022-01-31 07:00:42 +01:00
global_allocator.rs ast: Fix naming conventions in AST structures 2021-11-07 21:38:17 +08:00
lib.rs Replace confusing is_sorted_by in format_args implementation 2022-01-17 10:38:30 -08:00
log_syntax.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
panic.rs Use correct edition for panic in [debug_]assert!() etc. 2021-10-07 14:27:08 +02:00
proc_macro_harness.rs Compute proc_macros in resolutions. 2021-09-01 20:13:16 +02:00
source_util.rs Compute a better lint_node_id during expansion 2021-07-17 23:03:56 -05:00
standard_library_imports.rs rustc_span: Ident::invalid -> Ident::empty 2021-10-17 23:20:30 +03:00
test_harness.rs expand: Turn ast::Crate into a first class expansion target 2021-11-28 15:48:55 +08:00
test.rs Add a lint for duplicated attributes. 2021-12-15 23:43:13 +01:00
trace_macros.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
util.rs Add a lint for duplicated attributes. 2021-12-15 23:43:13 +01:00