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 ba6b45a commit 13d16da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi"
version = "0.1.7"
version = "0.1.8"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand Down
2 changes: 1 addition & 1 deletion quasi_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi_macros"
version = "0.1.7"
version = "0.1.8"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand Down
17 changes: 4 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ extern crate syntax;
use syntax::ast;
use syntax::codemap::Spanned;
use syntax::ext::base::ExtCtxt;
use syntax::owned_slice::OwnedSlice;
use syntax::parse::token;
use syntax::parse;
use syntax::print::pprust;
Expand Down Expand Up @@ -200,23 +199,15 @@ impl ToSourceWithHygiene for P<ast::ImplItem> {
impl ToSource for ast::WhereClause {
fn to_source(&self) -> String {
pprust::to_string(|s| {
s.print_where_clause(&ast::Generics {
lifetimes: vec![],
ty_params: OwnedSlice::empty(),
where_clause: self.clone(),
})
s.print_where_clause(&self)
})
}
}

impl ToSourceWithHygiene for ast::WhereClause {
fn to_source_with_hygiene(&self) -> String {
pprust::with_hygiene::to_string_hyg(|s| {
s.print_where_clause(&ast::Generics {
lifetimes: vec![],
ty_params: OwnedSlice::empty(),
where_clause: self.clone(),
})
s.print_where_clause(&self)
})
}
}
Expand Down Expand Up @@ -299,13 +290,13 @@ macro_rules! impl_to_source_isize {
);
}

impl_to_source_isize! { signed, isize, ast::TyIs(false) }
impl_to_source_isize! { signed, isize, ast::TyIs }
impl_to_source_isize! { signed, i8, ast::TyI8 }
impl_to_source_isize! { signed, i16, ast::TyI16 }
impl_to_source_isize! { signed, i32, ast::TyI32 }
impl_to_source_isize! { signed, i64, ast::TyI64 }

impl_to_source_isize! { unsigned, usize, ast::TyUs(false) }
impl_to_source_isize! { unsigned, usize, ast::TyUs }
impl_to_source_isize! { unsigned, u8, ast::TyU8 }
impl_to_source_isize! { unsigned, u16, ast::TyU16 }
impl_to_source_isize! { unsigned, u32, ast::TyU32 }
Expand Down

0 comments on commit 13d16da

Please sign in to comment.