Rename functions reflect that inline const is also "typeck_child"

This commit is contained in:
Gary Guo 2021-11-06 20:01:35 +00:00
parent d0f59f6d65
commit c4103d438f
18 changed files with 64 additions and 73 deletions

View file

@ -281,9 +281,9 @@ crate fn create_config(
// Closures' tables come from their outermost function,
// as they are part of the same "inference environment".
// This avoids emitting errors for the parent twice (see similar code in `typeck_with_fallback`)
let outer_def_id = tcx.closure_base_def_id(def_id.to_def_id()).expect_local();
if outer_def_id != def_id {
return tcx.typeck(outer_def_id);
let typeck_root_def_id = tcx.typeck_root_def_id(def_id.to_def_id()).expect_local();
if typeck_root_def_id != def_id {
return tcx.typeck(typeck_root_def_id);
}
let hir = tcx.hir();