about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBastian Kauschke <bastian_kauschke@hotmail.de>2020-07-15 11:26:26 +0200
committerBastian Kauschke <bastian_kauschke@hotmail.de>2020-07-15 13:06:47 +0200
commite070b45e6acb1cb2bbe06485721cb77de1e2469c (patch)
tree45482be0327f6f2a94181e118c9c71e5cd4878f7 /src
parentaca66bd052cc078edfdaee8500b41d0303e99cf3 (diff)
downloadrust-e070b45e6acb1cb2bbe06485721cb77de1e2469c.tar.gz
rust-e070b45e6acb1cb2bbe06485721cb77de1e2469c.zip
unsafety_check_result_for_const_arg
Diffstat (limited to 'src')
-rw-r--r--src/librustc_middle/query/mod.rs2
-rw-r--r--src/librustc_mir/transform/check_unsafety.rs4
-rw-r--r--src/librustc_mir/transform/mod.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_middle/query/mod.rs b/src/librustc_middle/query/mod.rs
index edeefab4342..0893a0f0844 100644
--- a/src/librustc_middle/query/mod.rs
+++ b/src/librustc_middle/query/mod.rs
@@ -501,7 +501,7 @@ rustc_queries! {
             desc { |tcx| "unsafety-checking `{}`", tcx.def_path_str(key.to_def_id()) }
             cache_on_disk_if { true }
         }
-        query unsafety_check_result_const_arg(key: (LocalDefId, DefId)) -> &'tcx mir::UnsafetyCheckResult {
+        query unsafety_check_result_for_const_arg(key: (LocalDefId, DefId)) -> &'tcx mir::UnsafetyCheckResult {
             desc {
                 |tcx| "unsafety-checking the const argument `{}`",
                 tcx.def_path_str(key.0.to_def_id())
diff --git a/src/librustc_mir/transform/check_unsafety.rs b/src/librustc_mir/transform/check_unsafety.rs
index 024244582bb..2605d45f810 100644
--- a/src/librustc_mir/transform/check_unsafety.rs
+++ b/src/librustc_mir/transform/check_unsafety.rs
@@ -493,7 +493,7 @@ pub(crate) fn provide(providers: &mut Providers) {
         unsafety_check_result: |tcx, def_id| {
             unsafety_check_result(tcx, ty::WithOptConstParam::unknown(def_id))
         },
-        unsafety_check_result_const_arg: |tcx, (did, param_did)| {
+        unsafety_check_result_for_const_arg: |tcx, (did, param_did)| {
             unsafety_check_result(
                 tcx,
                 ty::WithOptConstParam { did, const_param_did: Some(param_did) },
@@ -553,7 +553,7 @@ fn unsafety_check_result<'tcx>(
 ) -> &'tcx UnsafetyCheckResult {
     if def.const_param_did.is_none() {
         if let Some(param_did) = tcx.opt_const_param_of(def.did) {
-            return tcx.unsafety_check_result_const_arg((def.did, param_did));
+            return tcx.unsafety_check_result_for_const_arg((def.did, param_did));
         }
     }
 
diff --git a/src/librustc_mir/transform/mod.rs b/src/librustc_mir/transform/mod.rs
index db091b3a0ab..51a9e76e762 100644
--- a/src/librustc_mir/transform/mod.rs
+++ b/src/librustc_mir/transform/mod.rs
@@ -274,7 +274,7 @@ fn mir_const<'tcx>(
 
     // Unsafety check uses the raw mir, so make sure it is run.
     if let Some(param_did) = def.const_param_did {
-        tcx.ensure().unsafety_check_result_const_arg((def.did, param_did));
+        tcx.ensure().unsafety_check_result_for_const_arg((def.did, param_did));
     } else {
         tcx.ensure().unsafety_check_result(def.did);
     }