diff options
author | Tamir Duberstein <tamird@gmail.com> | 2017-09-08 15:08:01 -0400 |
---|---|---|
committer | Tamir Duberstein <tamird@gmail.com> | 2017-09-17 14:19:24 -0400 |
commit | 231d9e7e5d87ed54015c22bb1a07d0f3d4c0befa (patch) | |
tree | 6d9f4a927e17e9517da61f06dccca35286becdec /src/librustc_apfloat/lib.rs | |
parent | e788fa7b6cf07860eb0ff3e90ff32fc4f9d26cae (diff) | |
download | rust-231d9e7e5d87ed54015c22bb1a07d0f3d4c0befa.tar.gz |
Remove rustc_bitflags; use the bitflags crate
Diffstat (limited to 'src/librustc_apfloat/lib.rs')
-rw-r--r-- | src/librustc_apfloat/lib.rs | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/librustc_apfloat/lib.rs b/src/librustc_apfloat/lib.rs index c13141008a4..9e3e622e252 100644 --- a/src/librustc_apfloat/lib.rs +++ b/src/librustc_apfloat/lib.rs @@ -53,13 +53,17 @@ #![cfg_attr(not(stage0), feature(const_min_value))] #![cfg_attr(not(stage0), feature(const_max_value))] +// See librustc_cratesio_shim/Cargo.toml for a comment explaining this. +#[allow(unused_extern_crates)] +extern crate rustc_cratesio_shim; + #[macro_use] -extern crate rustc_bitflags; +extern crate bitflags; use std::cmp::Ordering; use std::fmt; use std::ops::{Neg, Add, Sub, Mul, Div, Rem}; -use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign, BitOrAssign}; +use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign}; use std::str::FromStr; bitflags! { @@ -67,20 +71,13 @@ bitflags! { /// /// UNDERFLOW or OVERFLOW are always returned or-ed with INEXACT. #[must_use] - #[derive(Debug)] - flags Status: u8 { - const OK = 0x00, - const INVALID_OP = 0x01, - const DIV_BY_ZERO = 0x02, - const OVERFLOW = 0x04, - const UNDERFLOW = 0x08, - const INEXACT = 0x10 - } -} - -impl BitOrAssign for Status { - fn bitor_assign(&mut self, rhs: Self) { - *self = *self | rhs; + pub struct Status: u8 { + const OK = 0x00; + const INVALID_OP = 0x01; + const DIV_BY_ZERO = 0x02; + const OVERFLOW = 0x04; + const UNDERFLOW = 0x08; + const INEXACT = 0x10; } } |