diff options
| author | Ben Kimock <kimockb@gmail.com> | 2025-02-19 05:39:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-19 05:39:15 +0000 |
| commit | e2ba35a451de25fdad24333040ee3dfca114614b (patch) | |
| tree | 175f3b6562847b432bc2f26c5a661ff97206c2fa /src/doc/rustc-dev-guide/examples | |
| parent | 821c33fe073c3e230baa207e88b973f9b4d96072 (diff) | |
| parent | 2e71770009871a3a8b4ec2974c4918c09445666b (diff) | |
| download | rust-e2ba35a451de25fdad24333040ee3dfca114614b.tar.gz rust-e2ba35a451de25fdad24333040ee3dfca114614b.zip | |
Merge pull request #4197 from rust-lang/rustup-2025-02-19
Automatic Rustup
Diffstat (limited to 'src/doc/rustc-dev-guide/examples')
| -rw-r--r-- | src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs b/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs index 9fcb16b0fca..dc63e1aa511 100644 --- a/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs +++ b/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs @@ -75,7 +75,7 @@ impl rustc_driver::Callbacks for MyCallbacks { let item = hir_krate.item(id); // Use pattern-matching to find a specific node inside the main function. if let rustc_hir::ItemKind::Fn(_, _, body_id) = item.kind { - let expr = &tcx.hir().body(body_id).value; + let expr = &tcx.hir_body(body_id).value; if let rustc_hir::ExprKind::Block(block, _) = expr.kind { if let rustc_hir::StmtKind::Let(let_stmt) = block.stmts[0].kind { if let Some(expr) = let_stmt.init { |
