X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_trait_selection%2Ftraits%2Ferror_reporting%2Fsuggestions.rs;h=5ec2d68ab2a7d52048b9ff211796181a9a694918;hb=75561a56ac57c47762b5ddddf7bb2e6798d98e7c;hp=a927013e25f5f101d3a3ce40ffaf72e71bd7bcdc;hpb=c890912da1742b5aae42c56e85758335de3af850;p=rust.git diff --git a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs b/src/librustc_trait_selection/traits/error_reporting/suggestions.rs index a927013e25f..5ec2d68ab2a 100644 --- a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs +++ b/src/librustc_trait_selection/traits/error_reporting/suggestions.rs @@ -1243,7 +1243,7 @@ fn maybe_note_obligation_cause_for_async_await( let tables: &TypeckTables<'tcx> = match &in_progress_tables { Some(t) if t.hir_owner.map(|owner| owner.to_def_id()) == Some(generator_did_root) => t, _ => { - query_tables = self.tcx.typeck_tables_of(generator_did); + query_tables = self.tcx.typeck_tables_of(generator_did.expect_local()); &query_tables } };