Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Update to rust HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed Mar 28, 2015
1 parent be60203 commit d7cdc55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "aster"
version = "0.1.7"
version = "0.1.8"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A libsyntax ast builder"
Expand Down
4 changes: 2 additions & 2 deletions src/lit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<F> LitBuilder<F>
}

pub fn isize(self, value: isize) -> F::Result {
self.build_int(value as i64, ast::IntTy::TyIs(false))
self.build_int(value as i64, ast::IntTy::TyIs)
}

pub fn i8(self, value: i8) -> F::Result {
Expand All @@ -80,7 +80,7 @@ impl<F> LitBuilder<F>
}

pub fn usize(self, value: usize) -> F::Result {
self.build_uint(value as u64, ast::UintTy::TyUs(false))
self.build_uint(value as u64, ast::UintTy::TyUs)
}

pub fn u8(self, value: u8) -> F::Result {
Expand Down
6 changes: 3 additions & 3 deletions tests/test_lit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ fn test_int() {
check(builder.lit().i16(5), 5, ast::SignedIntLit(ast::TyI16, ast::Plus));
check(builder.lit().i32(5), 5, ast::SignedIntLit(ast::TyI32, ast::Plus));
check(builder.lit().i64(5), 5, ast::SignedIntLit(ast::TyI64, ast::Plus));
check(builder.lit().isize(5), 5, ast::SignedIntLit(ast::TyIs(false), ast::Plus));
check(builder.lit().isize(5), 5, ast::SignedIntLit(ast::TyIs, ast::Plus));

check(builder.lit().i8(-5), -5, ast::SignedIntLit(ast::TyI8, ast::Minus));
check(builder.lit().i16(-5), -5, ast::SignedIntLit(ast::TyI16, ast::Minus));
check(builder.lit().i32(-5), -5, ast::SignedIntLit(ast::TyI32, ast::Minus));
check(builder.lit().i64(-5), -5, ast::SignedIntLit(ast::TyI64, ast::Minus));
check(builder.lit().isize(-5), -5, ast::SignedIntLit(ast::TyIs(false), ast::Minus));
check(builder.lit().isize(-5), -5, ast::SignedIntLit(ast::TyIs, ast::Minus));

check(builder.lit().u8(5), 5, ast::UnsignedIntLit(ast::TyU8));
check(builder.lit().u16(5), 5, ast::UnsignedIntLit(ast::TyU16));
check(builder.lit().u32(5), 5, ast::UnsignedIntLit(ast::TyU32));
check(builder.lit().u64(5), 5, ast::UnsignedIntLit(ast::TyU64));
check(builder.lit().usize(5), 5, ast::UnsignedIntLit(ast::TyUs(false)));
check(builder.lit().usize(5), 5, ast::UnsignedIntLit(ast::TyUs));

check(builder.lit().int(5), 5, ast::UnsuffixedIntLit(ast::Plus));
check(builder.lit().int(-5), -5, ast::UnsuffixedIntLit(ast::Minus));
Expand Down

0 comments on commit d7cdc55

Please sign in to comment.