3
3
use crate :: utils:: get_attr;
4
4
use rustc_ast:: ast:: Attribute ;
5
5
use rustc_hir as hir;
6
- use rustc_hir :: print ;
6
+ use rustc_hir_pretty ;
7
7
use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
8
8
use rustc_session:: Session ;
9
9
use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
@@ -50,7 +50,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DeepCodeInspector {
50
50
hir:: VisibilityKind :: Crate ( _) => println ! ( "visible crate wide" ) ,
51
51
hir:: VisibilityKind :: Restricted { ref path, .. } => println ! (
52
52
"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 ) )
54
54
) ,
55
55
hir:: VisibilityKind :: Inherited => println ! ( "visibility inherited from outer item" ) ,
56
56
}
@@ -333,7 +333,7 @@ fn print_item(cx: &LateContext<'_, '_>, item: &hir::Item<'_>) {
333
333
hir:: VisibilityKind :: Crate ( _) => println ! ( "visible crate wide" ) ,
334
334
hir:: VisibilityKind :: Restricted { ref path, .. } => println ! (
335
335
"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 ) )
337
337
) ,
338
338
hir:: VisibilityKind :: Inherited => println ! ( "visibility inherited from outer item" ) ,
339
339
}
@@ -427,7 +427,7 @@ fn print_pat(cx: &LateContext<'_, '_>, pat: &hir::Pat<'_>, indent: usize) {
427
427
println ! (
428
428
"{}name: {}" ,
429
429
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 ) )
431
431
) ;
432
432
println ! ( "{}ignore leftover fields: {}" , ind, ignore) ;
433
433
println ! ( "{}fields:" , ind) ;
@@ -444,7 +444,7 @@ fn print_pat(cx: &LateContext<'_, '_>, pat: &hir::Pat<'_>, indent: usize) {
444
444
println ! (
445
445
"{}path: {}" ,
446
446
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 ) )
448
448
) ;
449
449
if let Some ( dot_position) = opt_dots_position {
450
450
println ! ( "{}dot position: {}" , ind, dot_position) ;
0 commit comments