Rejig some top-level rustc_hir_pretty functions.

There are several that are unused and can be removed.

And there are some calls to `to_string`, which can be expressed more
nicely as a `foo_to_string` call, and then `to_string` need not be
`pub`. (This requires adding `pat_to_string`).
This commit is contained in:
Nicholas Nethercote 2023-10-10 14:02:42 +11:00
parent 56400a0650
commit 359fa9822b
2 changed files with 2 additions and 2 deletions

View file

@ -49,7 +49,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryMutPassed {
cx,
arguments.iter().collect(),
cx.typeck_results().expr_ty(fn_expr),
&rustc_hir_pretty::to_string(rustc_hir_pretty::NO_ANN, |s| s.print_qpath(path, false)),
&rustc_hir_pretty::qpath_to_string(path),
"function",
);
}