From 80eae9a303509e5cb3dd3ac3af506b316eb77d77 Mon Sep 17 00:00:00 2001 From: Simon Perriard Date: Wed, 24 Nov 2021 10:03:36 +0100 Subject: [PATCH] make it compile with 1.56.0 --- examples/rustc-driver-example.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/rustc-driver-example.rs b/examples/rustc-driver-example.rs index 51af6f5a..29fa2478 100644 --- a/examples/rustc-driver-example.rs +++ b/examples/rustc-driver-example.rs @@ -73,7 +73,7 @@ fn main() { println!("{:#?}", parse); // Analyze the program and inspect the types of definitions. queries.global_ctxt().unwrap().take().enter(|tcx| { - for (_, item) in &tcx.hir().krate().items { + for item in tcx.hir().items() { match item.kind { rustc_hir::ItemKind::Static(_, _, _) | rustc_hir::ItemKind::Fn(_, _, _) => { let name = item.ident;