Skip to content

Commit 9fe6bb4

Browse files
committed
Add some comments.
1 parent 10c8b56 commit 9fe6bb4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

compiler/rustc_ast_pretty/src/pprust/state.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
//! AST pretty printing.
2+
//!
3+
//! Note that HIR pretty printing is layered on top of this crate.
4+
15
mod expr;
26
mod item;
37

@@ -256,6 +260,7 @@ impl std::ops::DerefMut for State<'_> {
256260
}
257261
}
258262

263+
/// This trait is used for both AST and HIR pretty-printing.
259264
pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::DerefMut {
260265
fn comments(&mut self) -> &mut Option<Comments<'a>>;
261266
fn ann_post(&mut self, ident: Ident);

compiler/rustc_hir_pretty/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
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+
14
#![recursion_limit = "256"]
25
#![deny(rustc::untranslatable_diagnostic)]
36
#![deny(rustc::diagnostic_outside_of_impl)]

0 commit comments

Comments
 (0)