Rename Printer constructor from mk_printer() to Printer::new()

This commit is contained in:
David Tolnay 2022-01-14 21:12:39 -08:00
parent de9b573eed
commit 953da9832d
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
3 changed files with 27 additions and 27 deletions

View file

@ -103,7 +103,7 @@ pub fn print_crate<'a>(
edition: Edition,
) -> String {
let mut s =
State { s: pp::mk_printer(), comments: Some(Comments::new(sm, filename, input)), ann };
State { s: pp::Printer::new(), comments: Some(Comments::new(sm, filename, input)), ann };
if is_expanded && !krate.attrs.iter().any(|attr| attr.has_name(sym::no_core)) {
// We need to print `#![no_std]` (and its feature gate) so that
@ -910,7 +910,7 @@ impl<'a> PrintState<'a> for State<'a> {
impl<'a> State<'a> {
pub fn new() -> State<'a> {
State { s: pp::mk_printer(), comments: None, ann: &NoAnn }
State { s: pp::Printer::new(), comments: None, ann: &NoAnn }
}
crate fn commasep_cmnt<T, F, G>(&mut self, b: Breaks, elts: &[T], mut op: F, mut get_span: G)