about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide/examples
diff options
context:
space:
mode:
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;