File tree 2 files changed +8
-0
lines changed
rustc_ast_pretty/src/pprust
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change
1
+ //! AST pretty printing.
2
+ //!
3
+ //! Note that HIR pretty printing is layered on top of this crate.
4
+
1
5
mod expr;
2
6
mod item;
3
7
@@ -256,6 +260,7 @@ impl std::ops::DerefMut for State<'_> {
256
260
}
257
261
}
258
262
263
+ /// This trait is used for both AST and HIR pretty-printing.
259
264
pub trait PrintState < ' a > : std:: ops:: Deref < Target = pp:: Printer > + std:: ops:: DerefMut {
260
265
fn comments ( & mut self ) -> & mut Option < Comments < ' a > > ;
261
266
fn ann_post ( & mut self , ident : Ident ) ;
Original file line number Diff line number Diff line change
1
+ //! HIR pretty-printing is layered on top of AST pretty-printing. A number of
2
+ //! the definitions in this file have equivalents in `rustc_ast_pretty`.
3
+
1
4
#![ recursion_limit = "256" ]
2
5
#![ deny( rustc:: untranslatable_diagnostic) ]
3
6
#![ deny( rustc:: diagnostic_outside_of_impl) ]
You can’t perform that action at this time.
0 commit comments