diff options
| author | Vladimir Pouzanov <farcaller@gmail.com> | 2015-03-19 17:01:46 +0000 |
|---|---|---|
| committer | Vladimir Pouzanov <farcaller@gmail.com> | 2015-03-19 17:04:03 +0000 |
| commit | bd1f562e19574fa3be5bec2aa661816ac830bb69 (patch) | |
| tree | 83832cd5c2d20c5d89386f8df83e4ff7c2972a9e /src/libsyntax | |
| parent | e3cde9783b33ed4decd467602ff3d47505eadab5 (diff) | |
| download | rust-bd1f562e19574fa3be5bec2aa661816ac830bb69.tar.gz rust-bd1f562e19574fa3be5bec2aa661816ac830bb69.zip | |
Added missing impl_to_source! and impl_to_tokens! for TraitItem.
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 de00ea4deae..c11ffe66e6c 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -177,6 +177,7 @@ pub mod rt { 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 } @@ -310,6 +311,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::TraitItem> } 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 51478ccf859..239fea57d94 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -359,6 +359,10 @@ 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)) } |
