mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Remove a dead code path
This commit is contained in:
parent
7f32f62aa5
commit
0559e50a6c
@ -438,18 +438,6 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn optimized_mir_or_const_arg_mir(
|
|
||||||
self,
|
|
||||||
def: ty::WithOptConstParam<DefId>,
|
|
||||||
) -> &'tcx Body<'tcx> {
|
|
||||||
if let Some((did, param_did)) = def.as_const_arg() {
|
|
||||||
self.mir_for_ctfe_of_const_arg((did, param_did))
|
|
||||||
} else {
|
|
||||||
self.optimized_mir(def.did)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn mir_for_ctfe_opt_const_arg(self, def: ty::WithOptConstParam<DefId>) -> &'tcx Body<'tcx> {
|
pub fn mir_for_ctfe_opt_const_arg(self, def: ty::WithOptConstParam<DefId>) -> &'tcx Body<'tcx> {
|
||||||
if let Some((did, param_did)) = def.as_const_arg() {
|
if let Some((did, param_did)) = def.as_const_arg() {
|
||||||
|
@ -2963,7 +2963,10 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
| DefKind::AnonConst => self.mir_for_ctfe_opt_const_arg(def),
|
| DefKind::AnonConst => self.mir_for_ctfe_opt_const_arg(def),
|
||||||
// If the caller wants `mir_for_ctfe` of a function they should not be using
|
// If the caller wants `mir_for_ctfe` of a function they should not be using
|
||||||
// `instance_mir`, so we'll assume const fn also wants the optimized version.
|
// `instance_mir`, so we'll assume const fn also wants the optimized version.
|
||||||
_ => self.optimized_mir_or_const_arg_mir(def),
|
_ => {
|
||||||
|
assert_eq!(def.const_param_did, None);
|
||||||
|
self.optimized_mir(def.did)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
ty::InstanceDef::VtableShim(..)
|
ty::InstanceDef::VtableShim(..)
|
||||||
| ty::InstanceDef::ReifyShim(..)
|
| ty::InstanceDef::ReifyShim(..)
|
||||||
|
Loading…
Reference in New Issue
Block a user