Skip to content

Commit

Permalink
Sort PRINT_KINDS.
Browse files Browse the repository at this point in the history
Alphabetical order is nicer than random order.
  • Loading branch information
nnethercote committed Nov 30, 2023
1 parent 24d4fe4 commit 20046ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
28 changes: 15 additions & 13 deletions compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2145,25 +2145,27 @@ fn collect_print_requests(
}

const PRINT_KINDS: &[(&str, PrintKind)] = &[
// tidy-alphabetical-start
("all-target-specs-json", PrintKind::AllTargetSpecs),
("calling-conventions", PrintKind::CallingConventions),
("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-libdir", PrintKind::TargetLibdir),
("cfg", PrintKind::Cfg),
("calling-conventions", PrintKind::CallingConventions),
("target-list", PrintKind::TargetList),
("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
Expand Down
Original file line number Diff line number Diff line change
@@ -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`

0 comments on commit 20046ce

Please sign in to comment.