提交 c0e11918 编写于 作者: O Oli Scherer

Don't build a ty::Const just to take it apart again

上级 5b6ddd50
......@@ -171,8 +171,7 @@ pub fn emulate_intrinsic(
};
let val =
self.tcx.const_eval_global_id(self.param_env, gid, Some(self.tcx.span))?;
let const_ = ty::Const { val: ty::ConstKind::Value(val), ty };
let val = self.const_to_op(&const_, None)?;
let val = self.const_val_to_op(val, ty, None)?;
self.copy_op(&val, dest)?;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册