diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2022-03-10 01:50:47 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2022-03-10 01:50:47 -0800 |
| commit | 705b8807d531348d05ed3e941b3af695abc24f85 (patch) | |
| tree | 6535f13fe1ee844a1096c029010b0f7fdae6f9b2 /compiler | |
| parent | 697464a487f8ca8bc0bfadaf4108bb356eb157e0 (diff) | |
| download | rust-705b8807d531348d05ed3e941b3af695abc24f85.tar.gz rust-705b8807d531348d05ed3e941b3af695abc24f85.zip | |
The `Clone::clone` call is now a `ConstantKind::Val`, not a `ConstantKind::Ty`
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/mir/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index fc438edc722..18c2dd71ad3 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -2214,7 +2214,7 @@ impl<'tcx> Operand<'tcx> { /// While this is unlikely in general, it's the normal case of what you'll /// find as the `func` in a [`TerminatorKind::Call`]. pub fn const_fn_def(&self) -> Option<(DefId, SubstsRef<'tcx>)> { - let const_ty = self.constant()?.literal.const_for_ty()?.ty(); + let const_ty = self.constant()?.literal.ty(); if let ty::FnDef(def_id, substs) = *const_ty.kind() { Some((def_id, substs)) } else { None } } } |
