Skip to content

Commit 494bc85

Browse files
committed
Tweak comments.
- Remove an out-of-date comment. (There is no `PpAnn` implementation for `hir::Crate`.) - Remove a low-value comment. - And break a very long comment.
1 parent 664b185 commit 494bc85

File tree

1 file changed

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

1 file changed

+2
-4
lines changed

Diff for: compiler/rustc_hir_pretty/src/lib.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ pub struct NoAnn;
5252
impl PpAnn for NoAnn {}
5353
pub const NO_ANN: &dyn PpAnn = &NoAnn;
5454

55-
/// Identical to the `PpAnn` implementation for `hir::Crate`,
56-
/// except it avoids creating a dependency on the whole crate.
5755
impl PpAnn for &dyn rustc_hir::intravisit::Map<'_> {
5856
fn nested(&self, state: &mut State<'_>, nested: Nested) {
5957
match nested {
@@ -446,7 +444,6 @@ impl<'a> State<'a> {
446444
self.end(); // end the outer ibox
447445
}
448446

449-
/// Pretty-print an item
450447
fn print_item(&mut self, item: &hir::Item<'_>) {
451448
self.hardbreak_if_not_bol();
452449
self.maybe_print_comment(item.span.lo());
@@ -2052,7 +2049,8 @@ impl<'a> State<'a> {
20522049

20532050
match binder {
20542051
hir::ClosureBinder::Default => {}
2055-
// we need to distinguish `|...| {}` from `for<> |...| {}` as `for<>` adds additional restrictions
2052+
// We need to distinguish `|...| {}` from `for<> |...| {}` as `for<>` adds additional
2053+
// restrictions.
20562054
hir::ClosureBinder::For { .. } if generic_params.is_empty() => self.word("for<>"),
20572055
hir::ClosureBinder::For { .. } => {
20582056
self.word("for");

0 commit comments

Comments
 (0)