33use crate :: utils:: get_attr;
44use rustc_ast:: ast:: Attribute ;
55use rustc_hir as hir;
6- use rustc_hir :: print ;
6+ use rustc_hir_pretty ;
77use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
88use rustc_session:: Session ;
99use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
@@ -50,7 +50,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DeepCodeInspector {
5050 hir:: VisibilityKind :: Crate ( _) => println ! ( "visible crate wide" ) ,
5151 hir:: VisibilityKind :: Restricted { ref path, .. } => println ! (
5252 "visible in module `{}`" ,
53- print :: to_string( print :: NO_ANN , |s| s. print_path( path, false ) )
53+ rustc_hir_pretty :: to_string( rustc_hir_pretty :: NO_ANN , |s| s. print_path( path, false ) )
5454 ) ,
5555 hir:: VisibilityKind :: Inherited => println ! ( "visibility inherited from outer item" ) ,
5656 }
@@ -333,7 +333,7 @@ fn print_item(cx: &LateContext<'_, '_>, item: &hir::Item<'_>) {
333333 hir:: VisibilityKind :: Crate ( _) => println ! ( "visible crate wide" ) ,
334334 hir:: VisibilityKind :: Restricted { ref path, .. } => println ! (
335335 "visible in module `{}`" ,
336- print :: to_string( print :: NO_ANN , |s| s. print_path( path, false ) )
336+ rustc_hir_pretty :: to_string( rustc_hir_pretty :: NO_ANN , |s| s. print_path( path, false ) )
337337 ) ,
338338 hir:: VisibilityKind :: Inherited => println ! ( "visibility inherited from outer item" ) ,
339339 }
@@ -427,7 +427,7 @@ fn print_pat(cx: &LateContext<'_, '_>, pat: &hir::Pat<'_>, indent: usize) {
427427 println ! (
428428 "{}name: {}" ,
429429 ind,
430- print :: to_string( print :: NO_ANN , |s| s. print_qpath( path, false ) )
430+ rustc_hir_pretty :: to_string( rustc_hir_pretty :: NO_ANN , |s| s. print_qpath( path, false ) )
431431 ) ;
432432 println ! ( "{}ignore leftover fields: {}" , ind, ignore) ;
433433 println ! ( "{}fields:" , ind) ;
@@ -444,7 +444,7 @@ fn print_pat(cx: &LateContext<'_, '_>, pat: &hir::Pat<'_>, indent: usize) {
444444 println ! (
445445 "{}path: {}" ,
446446 ind,
447- print :: to_string( print :: NO_ANN , |s| s. print_qpath( path, false ) )
447+ rustc_hir_pretty :: to_string( rustc_hir_pretty :: NO_ANN , |s| s. print_qpath( path, false ) )
448448 ) ;
449449 if let Some ( dot_position) = opt_dots_position {
450450 println ! ( "{}dot position: {}" , ind, dot_position) ;
0 commit comments