mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
unsafety_check_result_for_const_arg
This commit is contained in:
parent
aca66bd052
commit
e070b45e6a
@ -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())
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user