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.
This commit is contained in:
parent
664b1858aa
commit
494bc8514a
1 changed files with 2 additions and 4 deletions
|
@ -52,8 +52,6 @@ pub struct NoAnn;
|
||||||
impl PpAnn for NoAnn {}
|
impl PpAnn for NoAnn {}
|
||||||
pub const NO_ANN: &dyn PpAnn = &NoAnn;
|
pub const NO_ANN: &dyn PpAnn = &NoAnn;
|
||||||
|
|
||||||
/// Identical to the `PpAnn` implementation for `hir::Crate`,
|
|
||||||
/// except it avoids creating a dependency on the whole crate.
|
|
||||||
impl PpAnn for &dyn rustc_hir::intravisit::Map<'_> {
|
impl PpAnn for &dyn rustc_hir::intravisit::Map<'_> {
|
||||||
fn nested(&self, state: &mut State<'_>, nested: Nested) {
|
fn nested(&self, state: &mut State<'_>, nested: Nested) {
|
||||||
match nested {
|
match nested {
|
||||||
|
@ -446,7 +444,6 @@ impl<'a> State<'a> {
|
||||||
self.end(); // end the outer ibox
|
self.end(); // end the outer ibox
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Pretty-print an item
|
|
||||||
fn print_item(&mut self, item: &hir::Item<'_>) {
|
fn print_item(&mut self, item: &hir::Item<'_>) {
|
||||||
self.hardbreak_if_not_bol();
|
self.hardbreak_if_not_bol();
|
||||||
self.maybe_print_comment(item.span.lo());
|
self.maybe_print_comment(item.span.lo());
|
||||||
|
@ -2052,7 +2049,8 @@ impl<'a> State<'a> {
|
||||||
|
|
||||||
match binder {
|
match binder {
|
||||||
hir::ClosureBinder::Default => {}
|
hir::ClosureBinder::Default => {}
|
||||||
// we need to distinguish `|...| {}` from `for<> |...| {}` as `for<>` adds additional restrictions
|
// We need to distinguish `|...| {}` from `for<> |...| {}` as `for<>` adds additional
|
||||||
|
// restrictions.
|
||||||
hir::ClosureBinder::For { .. } if generic_params.is_empty() => self.word("for<>"),
|
hir::ClosureBinder::For { .. } if generic_params.is_empty() => self.word("for<>"),
|
||||||
hir::ClosureBinder::For { .. } => {
|
hir::ClosureBinder::For { .. } => {
|
||||||
self.word("for");
|
self.word("for");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue