From 941d90d97f8ab8658fca613c0ff79cde8ddf8fb5 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 23 Oct 2014 23:56:33 +0900 Subject: [PATCH] Add syntax::print::pprint::view_item_to_string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … similar to the existing `item_to_string`. There may be more missing like this. --- src/libsyntax/print/pprust.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index cdcbeedddb2..5265c193fba 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -224,6 +224,10 @@ pub fn item_to_string(i: &ast::Item) -> String { $to_string(|s| s.print_item(i)) } +pub fn view_item_to_string(i: &ast::ViewItem) -> String { + $to_string(|s| s.print_view_item(i)) +} + pub fn generics_to_string(generics: &ast::Generics) -> String { $to_string(|s| s.print_generics(generics)) }