]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_hir/print.rs
Auto merge of #69482 - lqd:poloniusup, r=nikomatsakis
[rust.git] / src / librustc_hir / print.rs
index c9faa299d372e0f2e2aad6f3081b02fe8365550b..8cbbef959ce75ca4d40f26e4c8c49749cc59120b 100644 (file)
@@ -1,12 +1,12 @@
+use rustc_ast::ast;
+use rustc_ast::util::parser::{self, AssocOp, Fixity};
 use rustc_ast_pretty::pp::Breaks::{Consistent, Inconsistent};
 use rustc_ast_pretty::pp::{self, Breaks};
-use rustc_ast_pretty::pprust::{self, Comments, PrintState};
+use rustc_ast_pretty::pprust::{Comments, PrintState};
 use rustc_span::source_map::{SourceMap, Spanned};
-use rustc_span::symbol::kw;
+use rustc_span::symbol::{kw, IdentPrinter};
 use rustc_span::{self, BytePos, FileName};
 use rustc_target::spec::abi::Abi;
-use syntax::ast;
-use syntax::util::parser::{self, AssocOp, Fixity};
 
 use crate::hir;
 use crate::hir::{GenericArg, GenericParam, GenericParamKind, Node};
@@ -126,7 +126,7 @@ fn comments(&mut self) -> &mut Option<Comments<'a>> {
     }
 
     fn print_ident(&mut self, ident: ast::Ident) {
-        self.s.word(pprust::ast_ident_to_string(ident, ident.is_raw_guess()));
+        self.s.word(IdentPrinter::for_ast_ident(ident, ident.is_raw_guess()).to_string());
         self.ann.post(self, AnnNode::Name(&ident.name))
     }