Skip to content

Commit

Permalink
Added missing impl_to_source! and impl_to_tokens! for ImplItem.
Browse files Browse the repository at this point in the history
This fixes several use cases that were broken after #23265 landed.
  • Loading branch information
farcaller committed Mar 19, 2015
1 parent 08dd30d commit e3cde97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libsyntax/ext/quote.rs
Expand Up @@ -176,6 +176,7 @@ 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::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 +309,7 @@ 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::Pat> }
impl_to_tokens! { ast::Arm }
impl_to_tokens_lifetime! { &'a [P<ast::Item>] }
Expand Down
4 changes: 4 additions & 0 deletions src/libsyntax/print/pprust.rs
Expand Up @@ -355,6 +355,10 @@ 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 generics_to_string(generics: &ast::Generics) -> String {
$to_string(|s| s.print_generics(generics))
}
Expand Down

0 comments on commit e3cde97

Please sign in to comment.