syntax: impl ToTokens for P<ast::ImplItem>

This commit is contained in:
Richo Healey 2016-03-15 19:50:11 +01:00
parent f9121e87a6
commit 178b28099f

View file

@ -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,