Skip to content

Commit

Permalink
Rollup merge of rust-lang#23518 - farcaller:fix_quote_method, r=eddyb
Browse files Browse the repository at this point in the history
 This fixes several use cases that were broken after rust-lang#23265 landed.
  • Loading branch information
Manishearth committed Mar 20, 2015
2 parents c785e7e + bd1f562 commit 2ac03bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libsyntax/ext/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ pub mod rt {
impl_to_source! { ast::Arg, arg_to_string }
impl_to_source! { Generics, generics_to_string }
impl_to_source! { P<ast::Item>, item_to_string }
impl_to_source! { P<ast::ImplItem>, impl_item_to_string }
impl_to_source! { P<ast::TraitItem>, trait_item_to_string }
impl_to_source! { P<ast::Stmt>, stmt_to_string }
impl_to_source! { P<ast::Expr>, expr_to_string }
impl_to_source! { P<ast::Pat>, pat_to_string }
Expand Down Expand Up @@ -308,6 +310,8 @@ pub mod rt {

impl_to_tokens! { ast::Ident }
impl_to_tokens! { P<ast::Item> }
impl_to_tokens! { P<ast::ImplItem> }
impl_to_tokens! { P<ast::TraitItem> }
impl_to_tokens! { P<ast::Pat> }
impl_to_tokens! { ast::Arm }
impl_to_tokens_lifetime! { &'a [P<ast::Item>] }
Expand Down
8 changes: 8 additions & 0 deletions src/libsyntax/print/pprust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,14 @@ pub fn item_to_string(i: &ast::Item) -> String {
$to_string(|s| s.print_item(i))
}

pub fn impl_item_to_string(i: &ast::ImplItem) -> String {
$to_string(|s| s.print_impl_item(i))
}

pub fn trait_item_to_string(i: &ast::TraitItem) -> String {
$to_string(|s| s.print_trait_item(i))
}

pub fn generics_to_string(generics: &ast::Generics) -> String {
$to_string(|s| s.print_generics(generics))
}
Expand Down

0 comments on commit 2ac03bc

Please sign in to comment.