From 4ec07ed29a835e091051bd0a92f7f8a8cd22ad42 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Fri, 13 Mar 2015 22:22:04 -0700 Subject: syntax: Allow where strings to be parsed independent from generics This allows quasiquoting to insert where clauses. --- src/libsyntax/ext/quote.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index c11ffe66e6c..7dac40c87d1 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -175,6 +175,7 @@ pub mod rt { 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, item_to_string } impl_to_source! { P, impl_item_to_string } impl_to_source! { P, trait_item_to_string } @@ -318,6 +319,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 } impl_to_tokens! { P } impl_to_tokens! { ast::Block } -- cgit 1.4.1-3-g733a5 From a17f5563b855cfaa1be0c1564a1e484dbb8e97a2 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Sat, 14 Mar 2015 00:20:30 -0700 Subject: syntax: Allow quotes to insert path --- src/libsyntax/ext/quote.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 7dac40c87d1..2f609d86f39 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -171,6 +171,7 @@ 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 } @@ -310,6 +311,7 @@ pub mod rt { } impl_to_tokens! { ast::Ident } + impl_to_tokens! { ast::Path } impl_to_tokens! { P } impl_to_tokens! { P } impl_to_tokens! { P } -- cgit 1.4.1-3-g733a5