make it compile with 1.56.0

This commit is contained in:
Simon Perriard 2021-11-24 10:03:36 +01:00 committed by Joshua Nelson
parent 6643adf704
commit 80eae9a303
1 changed files with 1 additions and 1 deletions

View File

@ -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;