Skip to content

Commit 941d90d

Browse files
committed
Add syntax::print::pprint::view_item_to_string
… similar to the existing `item_to_string`. There may be more missing like this.
1 parent 37f2db7 commit 941d90d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libsyntax/print/pprust.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ pub fn item_to_string(i: &ast::Item) -> String {
224224
$to_string(|s| s.print_item(i))
225225
}
226226

227+
pub fn view_item_to_string(i: &ast::ViewItem) -> String {
228+
$to_string(|s| s.print_view_item(i))
229+
}
230+
227231
pub fn generics_to_string(generics: &ast::Generics) -> String {
228232
$to_string(|s| s.print_generics(generics))
229233
}

0 commit comments

Comments
 (0)