diff options
| author | Vladimir Pouzanov <farcaller@gmail.com> | 2015-03-19 17:01:15 +0000 |
|---|---|---|
| committer | Vladimir Pouzanov <farcaller@gmail.com> | 2015-03-19 17:01:15 +0000 |
| commit | e3cde9783b33ed4decd467602ff3d47505eadab5 (patch) | |
| tree | f99d2bd71eba79df58d24378197f5cf19caa2189 /src/libsyntax | |
| parent | 08dd30d9eb685f29b82faae66b5fdb9fc4762a91 (diff) | |
| download | rust-e3cde9783b33ed4decd467602ff3d47505eadab5.tar.gz rust-e3cde9783b33ed4decd467602ff3d47505eadab5.zip | |
Added missing impl_to_source! and impl_to_tokens! for ImplItem.
This fixes several use cases that were broken after #23265 landed.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index c38556b0782..de00ea4deae 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -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 } @@ -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>] } diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index b58c121c5fd..51478ccf859 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -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)) } |
