1
Fork 0

Prepare mir::Constant for ty::Const only supporting valtrees

This commit is contained in:
Oli Scherer 2021-03-08 16:18:03 +00:00
parent 3ecde6f5db
commit 3127a9c60f
38 changed files with 369 additions and 153 deletions

View file

@ -205,7 +205,7 @@ impl PeekCall {
if let mir::TerminatorKind::Call { func: Operand::Constant(func), args, .. } =
&terminator.kind
{
if let ty::FnDef(def_id, substs) = *func.literal.ty.kind() {
if let ty::FnDef(def_id, substs) = *func.literal.ty().kind() {
let sig = tcx.fn_sig(def_id);
let name = tcx.item_name(def_id);
if sig.abi() != Abi::RustIntrinsic || name != sym::rustc_peek {