mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 18:40:57 +03:00
Added missing impl_to_source! and impl_to_tokens! for TraitItem.
This commit is contained in:
@@ -177,6 +177,7 @@ fn to_source_with_hygiene(&self) -> 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 }
|
||||
@@ -310,6 +311,7 @@ fn to_tokens(&self, cx: &ExtCtxt) -> Vec<TokenTree> {
|
||||
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>] }
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user