mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rename PrintKind::{AllTargetSpecs,TargetSpec} to {AllTargetSpecsJson,TargetSpecJson}
To correspond to their actual print request names, `target-spec-json` and `all-target-specs-json`, and for consistency with other print name <-> print kind mappings.
This commit is contained in:
@@ -649,10 +649,10 @@ fn print_crate_info(
|
||||
HostTuple => println_info!("{}", rustc_session::config::host_tuple()),
|
||||
Sysroot => println_info!("{}", sess.sysroot.display()),
|
||||
TargetLibdir => println_info!("{}", sess.target_tlib_path.dir.display()),
|
||||
TargetSpec => {
|
||||
TargetSpecJson => {
|
||||
println_info!("{}", serde_json::to_string_pretty(&sess.target.to_json()).unwrap());
|
||||
}
|
||||
AllTargetSpecs => {
|
||||
AllTargetSpecsJson => {
|
||||
let mut targets = BTreeMap::new();
|
||||
for name in rustc_target::spec::TARGETS {
|
||||
let triple = TargetTuple::from_tuple(name);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
pub const PRINT_KINDS: &[(&str, PrintKind)] = &[
|
||||
// tidy-alphabetical-start
|
||||
("all-target-specs-json", PrintKind::AllTargetSpecs),
|
||||
("all-target-specs-json", PrintKind::AllTargetSpecsJson),
|
||||
("calling-conventions", PrintKind::CallingConventions),
|
||||
("cfg", PrintKind::Cfg),
|
||||
("check-cfg", PrintKind::CheckCfg),
|
||||
@@ -63,7 +63,7 @@
|
||||
("target-features", PrintKind::TargetFeatures),
|
||||
("target-libdir", PrintKind::TargetLibdir),
|
||||
("target-list", PrintKind::TargetList),
|
||||
("target-spec-json", PrintKind::TargetSpec),
|
||||
("target-spec-json", PrintKind::TargetSpecJson),
|
||||
("tls-models", PrintKind::TlsModels),
|
||||
// tidy-alphabetical-end
|
||||
];
|
||||
@@ -874,7 +874,7 @@ pub struct PrintRequest {
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
pub enum PrintKind {
|
||||
// tidy-alphabetical-start
|
||||
AllTargetSpecs,
|
||||
AllTargetSpecsJson,
|
||||
CallingConventions,
|
||||
Cfg,
|
||||
CheckCfg,
|
||||
@@ -893,7 +893,7 @@ pub enum PrintKind {
|
||||
TargetFeatures,
|
||||
TargetLibdir,
|
||||
TargetList,
|
||||
TargetSpec,
|
||||
TargetSpecJson,
|
||||
TlsModels,
|
||||
// tidy-alphabetical-end
|
||||
}
|
||||
@@ -2063,7 +2063,7 @@ fn check_print_request_stability(
|
||||
(print_name, print_kind): (&str, PrintKind),
|
||||
) {
|
||||
match print_kind {
|
||||
PrintKind::AllTargetSpecs | PrintKind::CheckCfg | PrintKind::TargetSpec
|
||||
PrintKind::AllTargetSpecsJson | PrintKind::CheckCfg | PrintKind::TargetSpecJson
|
||||
if !unstable_opts.unstable_options =>
|
||||
{
|
||||
early_dcx.early_fatal(format!(
|
||||
|
||||
Reference in New Issue
Block a user