]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/quote.rs
rollup merge of #23776: nrc/allow_trivial_cast
[rust.git] / src / libsyntax / ext / quote.rs
index c11ffe66e6c392305450dd13706994e6ba3ed812..2f609d86f39ffdb1d82bee877d44ef7ec2a7a690 100644 (file)
@@ -171,10 +171,12 @@ fn to_source_with_hygiene(&self) -> String {
         }
     }
 
+    impl_to_source! { ast::Path, path_to_string }
     impl_to_source! { ast::Ty, ty_to_string }
     impl_to_source! { ast::Block, block_to_string }
     impl_to_source! { ast::Arg, arg_to_string }
     impl_to_source! { Generics, generics_to_string }
+    impl_to_source! { ast::WhereClause, where_clause_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 }
@@ -309,6 +311,7 @@ fn to_tokens(&self, cx: &ExtCtxt) -> Vec<TokenTree> {
     }
 
     impl_to_tokens! { ast::Ident }
+    impl_to_tokens! { ast::Path }
     impl_to_tokens! { P<ast::Item> }
     impl_to_tokens! { P<ast::ImplItem> }
     impl_to_tokens! { P<ast::TraitItem> }
@@ -318,6 +321,7 @@ fn to_tokens(&self, cx: &ExtCtxt) -> Vec<TokenTree> {
     impl_to_tokens! { ast::Ty }
     impl_to_tokens_lifetime! { &'a [ast::Ty] }
     impl_to_tokens! { Generics }
+    impl_to_tokens! { ast::WhereClause }
     impl_to_tokens! { P<ast::Stmt> }
     impl_to_tokens! { P<ast::Expr> }
     impl_to_tokens! { ast::Block }