-pub type Lit = Spanned<Lit_>;
-
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
-pub enum Sign {
- Minus,
- Plus
-}
-
-impl Sign {
- pub fn new<T: IntSign>(n: T) -> Sign {
- n.sign()
- }
-}
-
-pub trait IntSign {
- fn sign(&self) -> Sign;
-}
-macro_rules! doit {
- ($($t:ident)*) => ($(impl IntSign for $t {
- #[allow(unused_comparisons)]
- fn sign(&self) -> Sign {
- if *self < 0 {Minus} else {Plus}
- }
- })*)
-}
-doit! { i8 i16 i32 i64 isize u8 u16 u32 u64 usize }