fix clippy::unneeded-struct-pattern
This commit is contained in:
parent
5a89237680
commit
587012b85a
3 changed files with 13 additions and 13 deletions
|
|
@ -69,7 +69,7 @@ impl Step for Std {
|
|||
);
|
||||
|
||||
std_cargo(builder, target, compiler.stage, &mut cargo);
|
||||
if matches!(builder.config.cmd, Subcommand::Fix { .. }) {
|
||||
if matches!(builder.config.cmd, Subcommand::Fix) {
|
||||
// By default, cargo tries to fix all targets. Tell it not to fix tests until we've added `test` to the sysroot.
|
||||
cargo.arg("--lib");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2330,21 +2330,21 @@ impl Config {
|
|||
Subcommand::Doc { .. } => {
|
||||
flags.stage.or(doc_stage).unwrap_or(if download_rustc { 2 } else { 0 })
|
||||
}
|
||||
Subcommand::Build { .. } => {
|
||||
Subcommand::Build => {
|
||||
flags.stage.or(build_stage).unwrap_or(if download_rustc { 2 } else { 1 })
|
||||
}
|
||||
Subcommand::Test { .. } | Subcommand::Miri { .. } => {
|
||||
flags.stage.or(test_stage).unwrap_or(if download_rustc { 2 } else { 1 })
|
||||
}
|
||||
Subcommand::Bench { .. } => flags.stage.or(bench_stage).unwrap_or(2),
|
||||
Subcommand::Dist { .. } => flags.stage.or(dist_stage).unwrap_or(2),
|
||||
Subcommand::Install { .. } => flags.stage.or(install_stage).unwrap_or(2),
|
||||
Subcommand::Dist => flags.stage.or(dist_stage).unwrap_or(2),
|
||||
Subcommand::Install => flags.stage.or(install_stage).unwrap_or(2),
|
||||
Subcommand::Perf { .. } => flags.stage.unwrap_or(1),
|
||||
// These are all bootstrap tools, which don't depend on the compiler.
|
||||
// The stage we pass shouldn't matter, but use 0 just in case.
|
||||
Subcommand::Clean { .. }
|
||||
| Subcommand::Clippy { .. }
|
||||
| Subcommand::Fix { .. }
|
||||
| Subcommand::Fix
|
||||
| Subcommand::Run { .. }
|
||||
| Subcommand::Setup { .. }
|
||||
| Subcommand::Format { .. }
|
||||
|
|
@ -2359,10 +2359,10 @@ impl Config {
|
|||
Subcommand::Test { .. }
|
||||
| Subcommand::Miri { .. }
|
||||
| Subcommand::Doc { .. }
|
||||
| Subcommand::Build { .. }
|
||||
| Subcommand::Build
|
||||
| Subcommand::Bench { .. }
|
||||
| Subcommand::Dist { .. }
|
||||
| Subcommand::Install { .. } => {
|
||||
| Subcommand::Dist
|
||||
| Subcommand::Install => {
|
||||
assert_eq!(
|
||||
config.stage, 2,
|
||||
"x.py should be run with `--stage 2` on CI, but was run with `--stage {}`",
|
||||
|
|
@ -2372,7 +2372,7 @@ impl Config {
|
|||
Subcommand::Clean { .. }
|
||||
| Subcommand::Check { .. }
|
||||
| Subcommand::Clippy { .. }
|
||||
| Subcommand::Fix { .. }
|
||||
| Subcommand::Fix
|
||||
| Subcommand::Run { .. }
|
||||
| Subcommand::Setup { .. }
|
||||
| Subcommand::Format { .. }
|
||||
|
|
|
|||
|
|
@ -490,17 +490,17 @@ impl Subcommand {
|
|||
pub fn kind(&self) -> Kind {
|
||||
match self {
|
||||
Subcommand::Bench { .. } => Kind::Bench,
|
||||
Subcommand::Build { .. } => Kind::Build,
|
||||
Subcommand::Build => Kind::Build,
|
||||
Subcommand::Check { .. } => Kind::Check,
|
||||
Subcommand::Clippy { .. } => Kind::Clippy,
|
||||
Subcommand::Doc { .. } => Kind::Doc,
|
||||
Subcommand::Fix { .. } => Kind::Fix,
|
||||
Subcommand::Fix => Kind::Fix,
|
||||
Subcommand::Format { .. } => Kind::Format,
|
||||
Subcommand::Test { .. } => Kind::Test,
|
||||
Subcommand::Miri { .. } => Kind::Miri,
|
||||
Subcommand::Clean { .. } => Kind::Clean,
|
||||
Subcommand::Dist { .. } => Kind::Dist,
|
||||
Subcommand::Install { .. } => Kind::Install,
|
||||
Subcommand::Dist => Kind::Dist,
|
||||
Subcommand::Install => Kind::Install,
|
||||
Subcommand::Run { .. } => Kind::Run,
|
||||
Subcommand::Setup { .. } => Kind::Setup,
|
||||
Subcommand::Suggest { .. } => Kind::Suggest,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue