Skip to content

Commit

Permalink
syntax: impl ToTokens for P<ast::ImplItem>
Browse files Browse the repository at this point in the history
  • Loading branch information
richo committed Mar 15, 2016
1 parent f9121e8 commit 178b280
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libsyntax/ext/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ pub mod rt {
}
}

impl ToTokens for P<ast::ImplItem> {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span, token::Interpolated(token::NtImplItem(self.clone())))]
}
}

impl ToTokens for ast::TraitItem {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span,
Expand Down

0 comments on commit 178b280

Please sign in to comment.