Skip to content

Commit

Permalink
Add syntax::print::pprint::view_item_to_string
Browse files Browse the repository at this point in the history
… similar to the existing `item_to_string`.

There may be more missing like this.
  • Loading branch information
SimonSapin committed Oct 23, 2014
1 parent 37f2db7 commit 941d90d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libsyntax/print/pprust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 941d90d

Please sign in to comment.