Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename _args -> args in format_args expansion #93463

Merged
merged 1 commit into from
Jan 30, 2022
Merged

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Jan 29, 2022

As observed in #91359 (comment), prior to that PR this variable was sometimes never used, such as in the case of:

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:

::std::io::_print(::core::fmt::Arguments::new_v1(&["\n"], &[]));

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 29, 2022
@rust-highfive
Copy link
Collaborator

r? @cjgillot

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 29, 2022
@cjgillot
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 29, 2022

📌 Commit 6667d78 has been approved by cjgillot

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 29, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 30, 2022
…askrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#93256 (Make `join!` description more accurate)
 - rust-lang#93358 (Add note suggesting that predicate may be satisfied, but is not `const`)
 - rust-lang#93362 (Do not register infer var for GAT projection in RPIT)
 - rust-lang#93391 (rustdoc: remove tooltip from source link)
 - rust-lang#93414 (Move unstable is_{arch}_feature_detected! macros to std::arch)
 - rust-lang#93441 (rustdoc: load the set of in-scope traits for modules with no docstring)
 - rust-lang#93459 (fs: Don't copy d_name from struct dirent)
 - rust-lang#93463 (Rename _args -> args in format_args expansion)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9f6d0cb into rust-lang:master Jan 30, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 30, 2022
@dtolnay dtolnay deleted the _args branch January 31, 2022 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants