]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/query/mod.rs
Remove `rustc_allow_const_fn_ptr`
[rust.git] / compiler / rustc_middle / src / query / mod.rs
index 9c047cbfaefdd2b274061bd5e88ce112c81d51f4..d5b99ea4d288dc66a65bfe4b9fc304ade09eef5a 100644 (file)
@@ -457,10 +457,6 @@ fn describe_as_module(def_id: LocalDefId, tcx: TyCtxt<'_>) -> String {
             desc { |tcx| "checking if item is promotable: `{}`", tcx.def_path_str(key) }
         }
 
-        query const_fn_is_allowed_fn_ptr(key: DefId) -> bool {
-            desc { |tcx| "checking if const fn allows `fn()` types: `{}`", tcx.def_path_str(key) }
-        }
-
         /// Returns `true` if this is a foreign item (i.e., linked via `extern { ... }`).
         query is_foreign_item(key: DefId) -> bool {
             desc { |tcx| "checking if `{}` is a foreign item", tcx.def_path_str(key) }
@@ -742,6 +738,14 @@ fn describe_as_module(def_id: LocalDefId, tcx: TyCtxt<'_>) -> String {
             desc { "destructure constant" }
         }
 
+        /// Dereference a constant reference or raw pointer and turn the result into a constant
+        /// again.
+        query deref_const(
+            key: ty::ParamEnvAnd<'tcx, &'tcx ty::Const<'tcx>>
+        ) -> &'tcx ty::Const<'tcx> {
+            desc { "deref constant" }
+        }
+
         query const_caller_location(key: (rustc_span::Symbol, u32, u32)) -> ConstValue<'tcx> {
             desc { "get a &core::panic::Location referring to a span" }
         }