]> git.lizzy.rs Git - rust.git/commitdiff
syntax: Allow quotes to insert path
authorErick Tryzelaar <erick.tryzelaar@gmail.com>
Sat, 14 Mar 2015 07:20:30 +0000 (00:20 -0700)
committerErick Tryzelaar <erick.tryzelaar@gmail.com>
Tue, 24 Mar 2015 21:18:39 +0000 (14:18 -0700)
src/libsyntax/ext/quote.rs

index 7dac40c87d189a8fe9146b60dd94c2d645f9f1ec..2f609d86f39ffdb1d82bee877d44ef7ec2a7a690 100644 (file)
@@ -171,6 +171,7 @@ 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 }
@@ -310,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> }