Skip to content

Commit b007024

Browse files
committed
[REBASEME] rustc_target: move comment to macro
1 parent f407a01 commit b007024

File tree

2 files changed

+8
-29
lines changed

2 files changed

+8
-29
lines changed

compiler/rustc_target/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ macro_rules! target_spec_enum {
135135
$( #[$variant_attr:meta] )*
136136
$Variant,
137137
)*
138+
/// The vast majority of the time, the compiler deals with a fixed
139+
/// set of values, so it is convenient for them to be represented in
140+
/// an enum. However, it is possible to have arbitrary values in a
141+
/// target JSON file (which can be parsed when `--target` is
142+
/// specified). This might occur, for example, for an out-of-tree
143+
/// codegen backend that supports a value that rustc currently
144+
/// doesn't know about. This variant exists as an escape hatch for
145+
/// such cases.
138146
$( #[$other_variant_attr] )*
139147
$OtherVariant(crate::spec::StaticCow<str>),
140148
}

compiler/rustc_target/src/spec/mod.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,13 +1881,6 @@ crate::target_spec_enum! {
18811881
X86_64 = "x86_64",
18821882
Xtensa = "xtensa",
18831883
}
1884-
/// The vast majority of the time, the compiler deals with a fixed set of
1885-
/// target architectures, so it is convenient for them to be represented in
1886-
/// an enum. However, it is possible to have arbitrary values for the "arch"
1887-
/// field in a target JSON file (which can be parsed when `--target` is
1888-
/// specified). This might occur, for example, for an out-of-tree codegen
1889-
/// backend that supports an architecture that rustc currently doesn't know
1890-
/// about. This variant exists as an escape hatch for such cases.
18911884
other_variant = Unknown;
18921885
}
18931886

@@ -1981,14 +1974,6 @@ crate::target_spec_enum! {
19811974
Zkvm = "zkvm",
19821975
Unknown = "unknown",
19831976
}
1984-
/// The vast majority of the time, the compiler deals with a fixed set of
1985-
/// target operating systems, so it is convenient for them to be represented
1986-
/// in an enum. However, it is possible to have arbitrary values for the
1987-
/// "os" field in a target JSON file (which can be parsed when `--target` is
1988-
/// specified). This might occur, for example, for an out-of-tree codegen
1989-
/// backend that supports an operating system that rustc currently doesn't
1990-
/// know about. This variant exists as an escape hatch for such cases.
1991-
///
19921977
/// Unlike [`Arch::Unknown`], [`Env::Unknown`], and [`Vendor::Unknown`],
19931978
/// [`Os::Other`] is not named "unknown" because "unknown" is a an actual
19941979
/// value that the compiler is aware of.
@@ -2062,13 +2047,6 @@ crate::target_spec_enum! {
20622047
Win7 = "win7",
20632048
Wrs = "wrs",
20642049
}
2065-
/// The vast majority of the time, the compiler deals with a fixed set of
2066-
/// target vendors, so it is convenient for them to be represented in an
2067-
/// enum. However, it is possible to have arbitrary values for the "vendor"
2068-
/// field in a target JSON file (which can be parsed when `--target` is
2069-
/// specified). This might occur, for example, for an out-of-tree codegen
2070-
/// backend that supports a vendor that rustc currently doesn't know about.
2071-
/// This variant exists as an escape hatch for such cases.
20722050
other_variant = Unknown;
20732051
}
20742052

@@ -2101,13 +2079,6 @@ crate::target_spec_enum! {
21012079
X32 = "x32",
21022080
Unspecified = "",
21032081
}
2104-
/// The vast majority of the time, the compiler deals with a fixed set of
2105-
/// target ABIs, so it is convenient for them to be represented in an enum.
2106-
/// However, it is possible to have arbitrary values for the "abi" field in
2107-
/// a target JSON file (which can be parsed when `--target` is specified).
2108-
/// This might occur, for example, for an out-of-tree codegen backend that
2109-
/// supports an ABI that rustc currently doesn't know about. This variant
2110-
/// exists as an escape hatch for such cases.
21112082
other_variant = Unknown;
21122083
}
21132084

0 commit comments

Comments
 (0)