about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-30 00:04:17 +0100
committerGitHub <noreply@github.com>2022-01-30 00:04:17 +0100
commit9f6d0cb052e7d06685a851b0776b63dfe5883c9c (patch)
tree54f478e686227f316669078b0f9969ca744a874c /compiler/rustc_codegen_llvm/src/llvm_util.rs
parent0d08bbc8c862783581ec61081af79b467ce2d98c (diff)
parent6667d785d879b7393093428acd6bf2c5a6c6c33b (diff)
downloadrust-9f6d0cb052e7d06685a851b0776b63dfe5883c9c.tar.gz
rust-9f6d0cb052e7d06685a851b0776b63dfe5883c9c.zip
Rollup merge of #93463 - dtolnay:_args, r=cjgillot
Rename _args -> args in format_args expansion

As observed in https://github.com/rust-lang/rust/pull/91359#discussion_r786058960, prior to that PR this variable was sometimes never used, such as in the case of:

```rust
println!("");

// used to expand to:
::std::io::_print(
    ::core::fmt::Arguments::new_v1(
        &["\n"],
        &match () {
            _args => [],
        },
    ),
);
```

so the leading underscore in `_args` was used to suppress an unused variable lint. However after #91359 the variable is always used when present, as the unused case would instead expand to:

```rust
::std::io::_print(::core::fmt::Arguments::new_v1(&["\n"], &[]));
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions