Sort `PRINT_KINDS`.

Alphabetical order is nicer than random order.
This commit is contained in:
Nicholas Nethercote 2023-11-29 16:33:08 +11:00
parent 24d4fe4cd9
commit 20046ceb40
2 changed files with 18 additions and 16 deletions

View File

@ -2145,25 +2145,27 @@ fn collect_print_requests(
}
const PRINT_KINDS: &[(&str, PrintKind)] = &[
("crate-name", PrintKind::CrateName),
("file-names", PrintKind::FileNames),
("sysroot", PrintKind::Sysroot),
("target-libdir", PrintKind::TargetLibdir),
("cfg", PrintKind::Cfg),
// tidy-alphabetical-start
("all-target-specs-json", PrintKind::AllTargetSpecs),
("calling-conventions", PrintKind::CallingConventions),
("target-list", PrintKind::TargetList),
("cfg", PrintKind::Cfg),
("code-models", PrintKind::CodeModels),
("crate-name", PrintKind::CrateName),
("deployment-target", PrintKind::DeploymentTarget),
("file-names", PrintKind::FileNames),
("link-args", PrintKind::LinkArgs),
("native-static-libs", PrintKind::NativeStaticLibs),
("relocation-models", PrintKind::RelocationModels),
("split-debuginfo", PrintKind::SplitDebuginfo),
("stack-protector-strategies", PrintKind::StackProtectorStrategies),
("sysroot", PrintKind::Sysroot),
("target-cpus", PrintKind::TargetCPUs),
("target-features", PrintKind::TargetFeatures),
("relocation-models", PrintKind::RelocationModels),
("code-models", PrintKind::CodeModels),
("tls-models", PrintKind::TlsModels),
("native-static-libs", PrintKind::NativeStaticLibs),
("stack-protector-strategies", PrintKind::StackProtectorStrategies),
("target-libdir", PrintKind::TargetLibdir),
("target-list", PrintKind::TargetList),
("target-spec-json", PrintKind::TargetSpec),
("all-target-specs-json", PrintKind::AllTargetSpecs),
("link-args", PrintKind::LinkArgs),
("split-debuginfo", PrintKind::SplitDebuginfo),
("deployment-target", PrintKind::DeploymentTarget),
("tls-models", PrintKind::TlsModels),
// tidy-alphabetical-end
];
// We disallow reusing the same path in multiple prints, such as `--print

View File

@ -1,2 +1,2 @@
error: unknown print request `uwu`. Valid print requests are: `crate-name`, `file-names`, `sysroot`, `target-libdir`, `cfg`, `calling-conventions`, `target-list`, `target-cpus`, `target-features`, `relocation-models`, `code-models`, `tls-models`, `native-static-libs`, `stack-protector-strategies`, `target-spec-json`, `all-target-specs-json`, `link-args`, `split-debuginfo`, `deployment-target`
error: unknown print request `uwu`. Valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `code-models`, `crate-name`, `deployment-target`, `file-names`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models`