Add syntax::print::pprint::view_item_to_string

… similar to the existing `item_to_string`.

There may be more missing like this.
This commit is contained in:
Simon Sapin 2014-10-23 23:56:33 +09:00
parent 37f2db769f
commit 941d90d97f

View File

@ -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))
}