Skip to content

Commit 9761b17

Browse files
committed
Auto merge of #39218 - xen0n:syntax-warts, r=alexcrichton
syntax: remove abi::Os and abi::Architecture They're long dead since the switch to flexible targets, but was not removed like their consumers were. Interesting they even got maintained by various porters out there! Technically [syntax-breaking] as they're public API, but since they're unused in the compiler, the potential breakage IMO should be minimal.
2 parents f5d1128 + 578001a commit 9761b17

File tree

1 file changed

+0
-48
lines changed

1 file changed

+0
-48
lines changed

src/libsyntax/abi.rs

-48
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,6 @@
1010

1111
use std::fmt;
1212

13-
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
14-
#[allow(non_camel_case_types)]
15-
pub enum Os {
16-
Windows,
17-
Macos,
18-
Linux,
19-
Android,
20-
Freebsd,
21-
iOS,
22-
Dragonfly,
23-
Bitrig,
24-
Netbsd,
25-
Openbsd,
26-
NaCl,
27-
Haiku,
28-
Solaris,
29-
}
30-
3113
#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Debug)]
3214
pub enum Abi {
3315
// NB: This ordering MUST match the AbiDatas array below.
@@ -54,16 +36,6 @@ pub enum Abi {
5436
Unadjusted
5537
}
5638

57-
#[allow(non_camel_case_types)]
58-
#[derive(Copy, Clone, PartialEq, Debug)]
59-
pub enum Architecture {
60-
X86,
61-
X86_64,
62-
Arm,
63-
Mips,
64-
Mipsel
65-
}
66-
6739
#[derive(Copy, Clone)]
6840
pub struct AbiData {
6941
abi: Abi,
@@ -133,26 +105,6 @@ impl fmt::Display for Abi {
133105
}
134106
}
135107

136-
impl fmt::Display for Os {
137-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
138-
match *self {
139-
Os::Linux => "linux".fmt(f),
140-
Os::Windows => "windows".fmt(f),
141-
Os::Macos => "macos".fmt(f),
142-
Os::iOS => "ios".fmt(f),
143-
Os::Android => "android".fmt(f),
144-
Os::Freebsd => "freebsd".fmt(f),
145-
Os::Dragonfly => "dragonfly".fmt(f),
146-
Os::Bitrig => "bitrig".fmt(f),
147-
Os::Netbsd => "netbsd".fmt(f),
148-
Os::Openbsd => "openbsd".fmt(f),
149-
Os::NaCl => "nacl".fmt(f),
150-
Os::Haiku => "haiku".fmt(f),
151-
Os::Solaris => "solaris".fmt(f),
152-
}
153-
}
154-
}
155-
156108
#[allow(non_snake_case)]
157109
#[test]
158110
fn lookup_Rust() {

0 commit comments

Comments
 (0)