diff options
| author | bors <bors@rust-lang.org> | 2015-03-26 18:43:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-26 18:43:56 +0000 |
| commit | 53a183f0274316596bf9405944d4f0468d8c93e4 (patch) | |
| tree | 76fc0dfd1e757dffa30f5d317a9bba19d24b609f /src/libsyntax/ext | |
| parent | 199bdcfeff5cfafd1f8e8ff583d7209272469879 (diff) | |
| parent | a17f5563b855cfaa1be0c1564a1e484dbb8e97a2 (diff) | |
| download | rust-53a183f0274316596bf9405944d4f0468d8c93e4.tar.gz rust-53a183f0274316596bf9405944d4f0468d8c93e4.zip | |
Auto merge of #23359 - erickt:quote, r=pnkfelix
This PR allows the quote macros to unquote trait items, impl items, where clauses, and paths.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index a25a6451918..5bbcdea879d 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -171,10 +171,12 @@ pub mod rt { } } + 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 } @@ -310,6 +312,7 @@ pub mod rt { } 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> } @@ -319,6 +322,7 @@ pub mod rt { 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 } |
