about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide/examples
diff options
context:
space:
mode:
authorSimon Perriard <simon.perriard@chainsecurity.com>2021-11-24 10:03:36 +0100
committerJoshua Nelson <github@jyn.dev>2021-11-24 09:00:37 -0500
commitd199d090b6243a35f9b488d0c4a675f390c55fde (patch)
treec669f7b4329d98b1096f11ba4aa99d7aa24d3b3c /src/doc/rustc-dev-guide/examples
parent90c949fd6df98177a918223b88ba6e9b73b487b3 (diff)
downloadrust-d199d090b6243a35f9b488d0c4a675f390c55fde.tar.gz
rust-d199d090b6243a35f9b488d0c4a675f390c55fde.zip
make it compile with 1.56.0
Diffstat (limited to 'src/doc/rustc-dev-guide/examples')
-rw-r--r--src/doc/rustc-dev-guide/examples/rustc-driver-example.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs b/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs
index 51af6f5aab2..29fa24784ff 100644
--- a/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs
+++ b/src/doc/rustc-dev-guide/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;