about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2021-11-06 20:01:35 +0000
committerGary Guo <gary@garyguo.net>2021-11-07 04:00:34 +0000
commitc4103d438fa922edbe5c40085f40b96656c6b18a (patch)
treebded6fb2603bb5d7b2bda64f2207126ae59db735 /src
parentd0f59f6d6575e04d3e4d08e919ce01e29bc9e41e (diff)
downloadrust-c4103d438fa922edbe5c40085f40b96656c6b18a.tar.gz
rust-c4103d438fa922edbe5c40085f40b96656c6b18a.zip
Rename functions reflect that inline const is also "typeck_child"
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/core.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index b7251e8f571..3ed711c43e1 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -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();