We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Clone::clone
ConstantKind::Val
ConstantKind::Ty
1 parent 697464a commit 705b880Copy full SHA for 705b880
compiler/rustc_middle/src/mir/mod.rs
@@ -2214,7 +2214,7 @@ impl<'tcx> Operand<'tcx> {
2214
/// While this is unlikely in general, it's the normal case of what you'll
2215
/// find as the `func` in a [`TerminatorKind::Call`].
2216
pub fn const_fn_def(&self) -> Option<(DefId, SubstsRef<'tcx>)> {
2217
- let const_ty = self.constant()?.literal.const_for_ty()?.ty();
+ let const_ty = self.constant()?.literal.ty();
2218
if let ty::FnDef(def_id, substs) = *const_ty.kind() { Some((def_id, substs)) } else { None }
2219
}
2220
0 commit comments