We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
rustc_hir_pretty::item_to_string
1 parent 504ea67 commit f0966d2Copy full SHA for f0966d2
compiler/rustc_hir_pretty/src/lib.rs
@@ -325,6 +325,10 @@ pub fn expr_to_string(ann: &dyn PpAnn, pat: &hir::Expr<'_>) -> String {
325
to_string(ann, |s| s.print_expr(pat))
326
}
327
328
+pub fn item_to_string(ann: &dyn PpAnn, pat: &hir::Item<'_>) -> String {
329
+ to_string(ann, |s| s.print_item(pat))
330
+}
331
+
332
impl<'a> State<'a> {
333
fn bclose_maybe_open(&mut self, span: rustc_span::Span, close_box: bool) {
334
self.maybe_print_comment(span.hi());
0 commit comments