Skip to content

Commit e070b45

Browse files
committed
unsafety_check_result_for_const_arg
1 parent aca66bd commit e070b45

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/librustc_middle/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ rustc_queries! {
501501
desc { |tcx| "unsafety-checking `{}`", tcx.def_path_str(key.to_def_id()) }
502502
cache_on_disk_if { true }
503503
}
504-
query unsafety_check_result_const_arg(key: (LocalDefId, DefId)) -> &'tcx mir::UnsafetyCheckResult {
504+
query unsafety_check_result_for_const_arg(key: (LocalDefId, DefId)) -> &'tcx mir::UnsafetyCheckResult {
505505
desc {
506506
|tcx| "unsafety-checking the const argument `{}`",
507507
tcx.def_path_str(key.0.to_def_id())

src/librustc_mir/transform/check_unsafety.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ pub(crate) fn provide(providers: &mut Providers) {
493493
unsafety_check_result: |tcx, def_id| {
494494
unsafety_check_result(tcx, ty::WithOptConstParam::unknown(def_id))
495495
},
496-
unsafety_check_result_const_arg: |tcx, (did, param_did)| {
496+
unsafety_check_result_for_const_arg: |tcx, (did, param_did)| {
497497
unsafety_check_result(
498498
tcx,
499499
ty::WithOptConstParam { did, const_param_did: Some(param_did) },
@@ -553,7 +553,7 @@ fn unsafety_check_result<'tcx>(
553553
) -> &'tcx UnsafetyCheckResult {
554554
if def.const_param_did.is_none() {
555555
if let Some(param_did) = tcx.opt_const_param_of(def.did) {
556-
return tcx.unsafety_check_result_const_arg((def.did, param_did));
556+
return tcx.unsafety_check_result_for_const_arg((def.did, param_did));
557557
}
558558
}
559559

src/librustc_mir/transform/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ fn mir_const<'tcx>(
274274

275275
// Unsafety check uses the raw mir, so make sure it is run.
276276
if let Some(param_did) = def.const_param_did {
277-
tcx.ensure().unsafety_check_result_const_arg((def.did, param_did));
277+
tcx.ensure().unsafety_check_result_for_const_arg((def.did, param_did));
278278
} else {
279279
tcx.ensure().unsafety_check_result(def.did);
280280
}

0 commit comments

Comments
 (0)