Skip to content

Commit d27f727

Browse files
committed
Replace dependency on old internal crate with crates.io equivalent.
1 parent 951e084 commit d27f727

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ name = "rustc_apfloat"
88
path = "lib.rs"
99

1010
[dependencies]
11-
rustc_bitflags = { path = "../librustc_bitflags" }
11+
bitflags = "1.3.2"

lib.rs

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,36 +53,29 @@
5353
#![feature(try_from)]
5454

5555
#[macro_use]
56-
extern crate rustc_bitflags;
56+
extern crate bitflags;
5757

5858
#[macro_use]
5959
extern crate alloc;
6060

6161
use core::cmp::Ordering;
6262
use core::fmt;
6363
use core::ops::{Neg, Add, Sub, Mul, Div, Rem};
64-
use core::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign, BitOrAssign};
64+
use core::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
6565
use core::str::FromStr;
6666

6767
bitflags! {
6868
/// IEEE-754R 7: Default exception handling.
6969
///
7070
/// UNDERFLOW or OVERFLOW are always returned or-ed with INEXACT.
7171
#[must_use]
72-
#[derive(Debug)]
73-
flags Status: u8 {
74-
const OK = 0x00,
75-
const INVALID_OP = 0x01,
76-
const DIV_BY_ZERO = 0x02,
77-
const OVERFLOW = 0x04,
78-
const UNDERFLOW = 0x08,
79-
const INEXACT = 0x10
80-
}
81-
}
82-
83-
impl BitOrAssign for Status {
84-
fn bitor_assign(&mut self, rhs: Self) {
85-
*self = *self | rhs;
72+
pub struct Status: u8 {
73+
const OK = 0x00;
74+
const INVALID_OP = 0x01;
75+
const DIV_BY_ZERO = 0x02;
76+
const OVERFLOW = 0x04;
77+
const UNDERFLOW = 0x08;
78+
const INEXACT = 0x10;
8679
}
8780
}
8881

0 commit comments

Comments
 (0)