summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query
diff options
context:
space:
mode:
authorBastian Kauschke <bastian_kauschke@hotmail.de>2020-09-10 09:06:30 +0200
committerBastian Kauschke <bastian_kauschke@hotmail.de>2020-09-18 16:25:25 +0200
commitd327fa112b8ca56e8c310a8ec9bf458909beacfe (patch)
treef5c79a107ae23b1402641c81726e07e27d8e59ab /compiler/rustc_middle/src/query
parent2c69266c0697b0c0b34abea62cba1a1d3c59c90c (diff)
downloadrust-d327fa112b8ca56e8c310a8ec9bf458909beacfe.tar.gz
rust-d327fa112b8ca56e8c310a8ec9bf458909beacfe.zip
initial working state
Diffstat (limited to 'compiler/rustc_middle/src/query')
-rw-r--r--compiler/rustc_middle/src/query/mod.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index 15e3110bc85..41b8bb60ef5 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -244,6 +244,25 @@ rustc_queries! {
             no_hash
         }
 
+        /// Try to build an abstract representation of the given constant.
+        query mir_abstract_const(
+            key: DefId
+        ) -> Option<&'tcx [mir::abstract_const::Node<'tcx>]> {
+            desc {
+                |tcx| "building an abstract representation for {}", tcx.def_path_str(key),
+            }
+        }
+        /// Try to build an abstract representation of the given constant.
+        query mir_abstract_const_of_const_arg(
+            key: (LocalDefId, DefId)
+        ) -> Option<&'tcx [mir::abstract_const::Node<'tcx>]> {
+            desc {
+                |tcx|
+                "building an abstract representation for the const argument {}",
+                tcx.def_path_str(key.0.to_def_id()),
+            }
+        }
+
         query mir_drops_elaborated_and_const_checked(
             key: ty::WithOptConstParam<LocalDefId>
         ) -> &'tcx Steal<mir::Body<'tcx>> {