Skip to content

Commit

Permalink
Use raw isize and usize constructors
Browse files Browse the repository at this point in the history
These have been added upstream!
  • Loading branch information
alexcrichton committed Jul 14, 2017
1 parent 7f46062 commit 6e81d76
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,22 +282,8 @@ macro_rules! ints {
}

ints! {
u8, u16, u32, u64, /*usize,*/
i8, i16, i32, i64, /*isize,*/
}

macro_rules! ints_stringified {
($($t:ident,)*) => {$(
impl From<$t> for Literal {
fn from(t: $t) -> Literal {
Literal(to_literal(&format!(concat!("{}", stringify!($t)), t)))
}
}
)*}
}

ints_stringified! {
usize, isize,
u8, u16, u32, u64, usize,
i8, i16, i32, i64, isize,
}

macro_rules! floats {
Expand Down

0 comments on commit 6e81d76

Please sign in to comment.