Skip to content

Commit bc692c3

Browse files
committed
fixup! fixup! rustc_target: introduce Vendor
1 parent 15d326e commit bc692c3

File tree

1 file changed

+5
-4
lines changed
  • compiler/rustc_target/src/spec

1 file changed

+5
-4
lines changed

compiler/rustc_target/src/spec/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,12 +2039,13 @@ crate::target_spec_enum! {
20392039
Sony = "sony",
20402040
Sun = "sun",
20412041
Unikraft = "unikraft",
2042+
Unknown = "unknown",
20422043
Uwp = "uwp",
20432044
Vex = "vex",
20442045
Win7 = "win7",
20452046
Wrs = "wrs",
20462047
}
2047-
other_variant = Unknown;
2048+
other_variant = Other;
20482049
}
20492050

20502051
impl Vendor {
@@ -2215,7 +2216,7 @@ pub struct TargetOptions {
22152216
/// However, parts of the backend do check this field for specific values to enable special behavior.
22162217
pub abi: Abi,
22172218
/// Vendor name to use for conditional compilation (`target_vendor`).
2218-
/// Defaults to [`Vendor::Unknown("unknown")`](Vendor::Unknown).
2219+
/// Defaults to [`Vendor::Unknown`].
22192220
pub vendor: Vendor,
22202221

22212222
/// Linker to invoke
@@ -2708,7 +2709,7 @@ impl Default for TargetOptions {
27082709
os: Os::None,
27092710
env: Env::Unspecified,
27102711
abi: Abi::Unspecified,
2711-
vendor: Vendor::Unknown("unknown".into()),
2712+
vendor: Vendor::Unknown,
27122713
linker: option_env!("CFG_DEFAULT_LINKER").map(|s| s.into()),
27132714
linker_flavor: LinkerFlavor::Gnu(Cc::Yes, Lld::No),
27142715
linker_flavor_json: LinkerFlavorCli::Gcc,
@@ -3064,7 +3065,7 @@ impl Target {
30643065
// If your target really needs to deviate from the rules below,
30653066
// except it and document the reasons.
30663067
// Keep the default "unknown" vendor instead.
3067-
if let Vendor::Unknown(s) = &self.vendor {
3068+
if let Vendor::Other(s) = &self.vendor {
30683069
check!(!s.is_empty(), "`vendor` cannot be empty");
30693070
}
30703071
if let Os::Other(s) = &self.os {

0 commit comments

Comments
 (0)