Skip to content

Commit 33cee0b

Browse files
committed
Remove NO_ANN.
This makes `rustc_hir_pretty` more like `rustc_ast_pretty`.
1 parent ce363bb commit 33cee0b

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_hir_pretty/src

1 file changed

+4
-4
lines changed

compiler/rustc_hir_pretty/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ pub trait PpAnn {
4949
}
5050

5151
pub struct NoAnn;
52+
5253
impl PpAnn for NoAnn {}
53-
pub const NO_ANN: &dyn PpAnn = &NoAnn;
5454

5555
impl PpAnn for &dyn rustc_hir::intravisit::Map<'_> {
5656
fn nested(&self, state: &mut State<'_>, nested: Nested) {
@@ -183,15 +183,15 @@ where
183183
}
184184

185185
pub fn ty_to_string(ty: &hir::Ty<'_>) -> String {
186-
to_string(NO_ANN, |s| s.print_type(ty))
186+
to_string(&NoAnn, |s| s.print_type(ty))
187187
}
188188

189189
pub fn qpath_to_string(segment: &hir::QPath<'_>) -> String {
190-
to_string(NO_ANN, |s| s.print_qpath(segment, false))
190+
to_string(&NoAnn, |s| s.print_qpath(segment, false))
191191
}
192192

193193
pub fn pat_to_string(pat: &hir::Pat<'_>) -> String {
194-
to_string(NO_ANN, |s| s.print_pat(pat))
194+
to_string(&NoAnn, |s| s.print_pat(pat))
195195
}
196196

197197
impl<'a> State<'a> {

0 commit comments

Comments
 (0)