提交 5800bec2 编写于 作者: R Ralf Jung

discourage use of ref_to_mplace

上级 3b229f14
...@@ -277,6 +277,10 @@ impl<'mir, 'tcx, Tag, M> InterpCx<'mir, 'tcx, M> ...@@ -277,6 +277,10 @@ impl<'mir, 'tcx, Tag, M> InterpCx<'mir, 'tcx, M>
{ {
/// Take a value, which represents a (thin or fat) reference, and make it a place. /// Take a value, which represents a (thin or fat) reference, and make it a place.
/// Alignment is just based on the type. This is the inverse of `MemPlace::to_ref()`. /// Alignment is just based on the type. This is the inverse of `MemPlace::to_ref()`.
///
/// Only call this if you are sure the place is "valid" (aligned and inbounds), or do not
/// want to ever use the place for memory access!
/// Generally prefer `deref_operand`.
pub fn ref_to_mplace( pub fn ref_to_mplace(
&self, &self,
val: ImmTy<'tcx, M::PointerTag>, val: ImmTy<'tcx, M::PointerTag>,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册