Add some comments.
This commit is contained in:
parent
10c8b56af1
commit
9fe6bb4a10
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
//! AST pretty printing.
|
||||
//!
|
||||
//! Note that HIR pretty printing is layered on top of this crate.
|
||||
|
||||
mod expr;
|
||||
mod item;
|
||||
|
||||
|
@ -256,6 +260,7 @@ impl std::ops::DerefMut for State<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
/// This trait is used for both AST and HIR pretty-printing.
|
||||
pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::DerefMut {
|
||||
fn comments(&mut self) -> &mut Option<Comments<'a>>;
|
||||
fn ann_post(&mut self, ident: Ident);
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
//! HIR pretty-printing is layered on top of AST pretty-printing. A number of
|
||||
//! the definitions in this file have equivalents in `rustc_ast_pretty`.
|
||||
|
||||
#![recursion_limit = "256"]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue