Skip to content

syntax: remove abi::Os and abi::Architecture #39218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions src/libsyntax/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,6 @@

use std::fmt;

#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[allow(non_camel_case_types)]
pub enum Os {
Windows,
Macos,
Linux,
Android,
Freebsd,
iOS,
Dragonfly,
Bitrig,
Netbsd,
Openbsd,
NaCl,
Haiku,
Solaris,
}

#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Debug)]
pub enum Abi {
// NB: This ordering MUST match the AbiDatas array below.
Expand All @@ -54,16 +36,6 @@ pub enum Abi {
Unadjusted
}

#[allow(non_camel_case_types)]
#[derive(Copy, Clone, PartialEq, Debug)]
pub enum Architecture {
X86,
X86_64,
Arm,
Mips,
Mipsel
}

#[derive(Copy, Clone)]
pub struct AbiData {
abi: Abi,
Expand Down Expand Up @@ -133,26 +105,6 @@ impl fmt::Display for Abi {
}
}

impl fmt::Display for Os {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Os::Linux => "linux".fmt(f),
Os::Windows => "windows".fmt(f),
Os::Macos => "macos".fmt(f),
Os::iOS => "ios".fmt(f),
Os::Android => "android".fmt(f),
Os::Freebsd => "freebsd".fmt(f),
Os::Dragonfly => "dragonfly".fmt(f),
Os::Bitrig => "bitrig".fmt(f),
Os::Netbsd => "netbsd".fmt(f),
Os::Openbsd => "openbsd".fmt(f),
Os::NaCl => "nacl".fmt(f),
Os::Haiku => "haiku".fmt(f),
Os::Solaris => "solaris".fmt(f),
}
}
}

#[allow(non_snake_case)]
#[test]
fn lookup_Rust() {
Expand Down