Skip to content

Commit bc34fac

Browse files
committed
Change name to reflect @Zoxc feedback
1 parent 1c6d13b commit bc34fac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/rustc-driver-example.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ fn main() {
8686
let parse = queries.parse().unwrap().take();
8787
println!("{:#?}", parse);
8888
// Analyze the program and inspect the types of definitions.
89-
queries.global_ctxt().unwrap().take().enter(|ctx| {
90-
for (_, item) in &ctx.hir().krate().items {
89+
queries.global_ctxt().unwrap().take().enter(|tcx| {
90+
for (_, item) in &tcx.hir().krate().items {
9191
match item.kind {
9292
rustc_hir::ItemKind::Static(_, _, _) | rustc_hir::ItemKind::Fn(_, _, _) => {
9393
let name = item.ident;
94-
let ty = ctx.type_of(ctx.hir().local_def_id(item.hir_id));
94+
let ty = tcx.type_of(tcx.hir().local_def_id(item.hir_id));
9595
println!("{:?}:\t{:?}", name, ty)
9696
}
9797
_ => (),

0 commit comments

Comments
 (0)