about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-07 13:46:42 -0700
committerbors <bors@rust-lang.org>2014-06-07 13:46:42 -0700
commit01eb0ce1227e3c7c2c32832508ea2930bd2cbb62 (patch)
tree9d8d8bbc9eba266e45a0384c94df7d987d982e07 /src/libsyntax/print/pprust.rs
parentddd09df1377456de0f8376414d27828ba104df5b (diff)
parentcc28ae5201b0927683b253dbe893a62a188aa5a5 (diff)
downloadrust-01eb0ce1227e3c7c2c32832508ea2930bd2cbb62.tar.gz
rust-01eb0ce1227e3c7c2c32832508ea2930bd2cbb62.zip
auto merge of #14722 : hannobraun/rust/quote-args, r=alexcrichton
The need for this came up while I worked on a procedural macro that parses an argument and adds the same argument to a generated function.
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
-rw-r--r--src/libsyntax/print/pprust.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 440070e70a6..05c2558da48 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -242,6 +242,10 @@ pub fn variant_to_str(var: &ast::Variant) -> String {
     to_str(|s| s.print_variant(var))
 }
 
+pub fn arg_to_str(arg: &ast::Arg) -> String {
+    to_str(|s| s.print_arg(arg))
+}
+
 pub fn visibility_qualified(vis: ast::Visibility, s: &str) -> String {
     match vis {
         ast::Public => format!("pub {}", s).to_string(),