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;
7
6
use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
8
7
use rustc_session:: Session ;
9
8
use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
@@ -50,7 +49,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DeepCodeInspector {
50
49
hir:: VisibilityKind :: Crate ( _) => println ! ( "visible crate wide" ) ,
51
50
hir:: VisibilityKind :: Restricted { ref path, .. } => println ! (
52
51
"visible in module `{}`" ,
53
- print :: to_string( print :: NO_ANN , |s| s. print_path( path, false ) )
52
+ rustc_hir_pretty :: to_string( rustc_hir_pretty :: NO_ANN , |s| s. print_path( path, false ) )
54
53
) ,
55
54
hir:: VisibilityKind :: Inherited => println ! ( "visibility inherited from outer item" ) ,
56
55
}
@@ -283,10 +282,10 @@ fn print_expr(cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>, indent: usize) {
283
282
print_expr ( cx, e, indent + 1 ) ;
284
283
}
285
284
} ,
286
- hir:: ExprKind :: InlineAsm ( ref asm) => {
285
+ hir:: ExprKind :: LlvmInlineAsm ( ref asm) => {
287
286
let inputs = & asm. inputs_exprs ;
288
287
let outputs = & asm. outputs_exprs ;
289
- println ! ( "{}InlineAsm " , ind) ;
288
+ println ! ( "{}LlvmInlineAsm " , ind) ;
290
289
println ! ( "{}inputs:" , ind) ;
291
290
for e in inputs. iter ( ) {
292
291
print_expr ( cx, e, indent + 1 ) ;
@@ -333,7 +332,7 @@ fn print_item(cx: &LateContext<'_, '_>, item: &hir::Item<'_>) {
333
332
hir:: VisibilityKind :: Crate ( _) => println ! ( "visible crate wide" ) ,
334
333
hir:: VisibilityKind :: Restricted { ref path, .. } => println ! (
335
334
"visible in module `{}`" ,
336
- print :: to_string( print :: NO_ANN , |s| s. print_path( path, false ) )
335
+ rustc_hir_pretty :: to_string( rustc_hir_pretty :: NO_ANN , |s| s. print_path( path, false ) )
337
336
) ,
338
337
hir:: VisibilityKind :: Inherited => println ! ( "visibility inherited from outer item" ) ,
339
338
}
@@ -427,7 +426,7 @@ fn print_pat(cx: &LateContext<'_, '_>, pat: &hir::Pat<'_>, indent: usize) {
427
426
println ! (
428
427
"{}name: {}" ,
429
428
ind,
430
- print :: to_string( print :: NO_ANN , |s| s. print_qpath( path, false ) )
429
+ rustc_hir_pretty :: to_string( rustc_hir_pretty :: NO_ANN , |s| s. print_qpath( path, false ) )
431
430
) ;
432
431
println ! ( "{}ignore leftover fields: {}" , ind, ignore) ;
433
432
println ! ( "{}fields:" , ind) ;
@@ -444,7 +443,7 @@ fn print_pat(cx: &LateContext<'_, '_>, pat: &hir::Pat<'_>, indent: usize) {
444
443
println ! (
445
444
"{}path: {}" ,
446
445
ind,
447
- print :: to_string( print :: NO_ANN , |s| s. print_qpath( path, false ) )
446
+ rustc_hir_pretty :: to_string( rustc_hir_pretty :: NO_ANN , |s| s. print_qpath( path, false ) )
448
447
) ;
449
448
if let Some ( dot_position) = opt_dots_position {
450
449
println ! ( "{}dot position: {}" , ind, dot_position) ;
0 commit comments