Skip to content

Commit 705b880

Browse files
committed
The Clone::clone call is now a ConstantKind::Val, not a ConstantKind::Ty
1 parent 697464a commit 705b880

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_middle/src/mir

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@ impl<'tcx> Operand<'tcx> {
22142214
/// While this is unlikely in general, it's the normal case of what you'll
22152215
/// find as the `func` in a [`TerminatorKind::Call`].
22162216
pub fn const_fn_def(&self) -> Option<(DefId, SubstsRef<'tcx>)> {
2217-
let const_ty = self.constant()?.literal.const_for_ty()?.ty();
2217+
let const_ty = self.constant()?.literal.ty();
22182218
if let ty::FnDef(def_id, substs) = *const_ty.kind() { Some((def_id, substs)) } else { None }
22192219
}
22202220
}

0 commit comments

Comments
 (0)