rust/compiler/rustc_ast/src
bors 0bcacb391b 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)],
    ));
};
```
2022-01-21 06:20:18 +00:00
..
ast mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
attr Correctly handle starts in block doc comments 2022-01-19 11:18:17 +01:00
expand Make allocator_kind a query. 2021-06-20 11:52:51 +02:00
util Correctly handle starts in block doc comments 2022-01-19 11:18:17 +01:00
ast.rs Auto merge of #91359 - dtolnay:args, r=Mark-Simulacrum 2022-01-21 06:20:18 +00:00
ast_like.rs expand: Refactor InvocationCollector visitor for better code reuse 2022-01-07 14:41:22 +08:00
entry.rs Fix ICE when main is declared in an extern block 2021-06-09 23:14:02 -04:00
lib.rs expand: Refactor InvocationCollector visitor for better code reuse 2022-01-07 14:41:22 +08:00
mut_visit.rs Add term 2022-01-17 17:20:57 +00:00
node_id.rs Use LocalExpnId where possible. 2021-07-17 19:41:02 +02:00
ptr.rs Remove box syntax from rustc_ast 2021-08-18 09:25:26 +02:00
token.rs Use TokenKind::similar_tokens() 2021-10-04 22:13:00 +02:00
tokenstream.rs fix: inner attribute followed by outer attribute causing ICE 2021-10-25 17:31:27 +02:00
visit.rs Add term 2022-01-17 17:20:57 +00:00