about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src/plumbing.rs
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2022-02-16 18:06:50 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2022-02-17 18:08:45 -0500
commitddda851fd542775d936eb7fe7e684bb6f2b4bbde (patch)
tree0045a22d9f63cedd9aa6ce9f0637a3b35075182b /compiler/rustc_query_impl/src/plumbing.rs
parent393fdc10483da930cdbb00eabc3635030d2e776f (diff)
downloadrust-ddda851fd542775d936eb7fe7e684bb6f2b4bbde.tar.gz
rust-ddda851fd542775d936eb7fe7e684bb6f2b4bbde.zip
Remove SimpleDefKind
Diffstat (limited to 'compiler/rustc_query_impl/src/plumbing.rs')
-rw-r--r--compiler/rustc_query_impl/src/plumbing.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index ff9d32a6776..f9668a76723 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -289,13 +289,11 @@ macro_rules! define_queries {
                 } else {
                     Some(key.default_span(*tcx))
                 };
-                let def_id = key.key_as_def_id();
-                let def_kind = def_id
+                // Use `tcx.hir().opt_def_kind()` to reduce the chance of
+                // accidentally triggering an infinite query loop.
+                let def_kind = key.key_as_def_id()
                     .and_then(|def_id| def_id.as_local())
-                    // Use `tcx.hir().opt_def_kind()` to reduce the chance of
-                    // accidentally triggering an infinite query loop.
-                    .and_then(|def_id| tcx.hir().opt_def_kind(def_id))
-                    .map(|def_kind| $crate::util::def_kind_to_simple_def_kind(def_kind));
+                    .and_then(|def_id| tcx.hir().opt_def_kind(def_id));
                 let hash = || {
                     let mut hcx = tcx.create_stable_hashing_context();
                     let mut hasher = StableHasher::new();