Doc comment fixes for rustc::mir::interpret::InterpretCx

This commit is contained in:
Wesley Wiser 2019-05-31 05:01:35 -04:00
parent 3ade426ede
commit 3b7223deaf
3 changed files with 8 additions and 8 deletions

View File

@ -243,7 +243,7 @@ pub(super) fn from_known_layout<'tcx>(
}
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M> {
/// Try reading an immediate in memory; this is interesting particularly for ScalarPair.
/// Try reading an immediate in memory; this is interesting particularly for `ScalarPair`.
/// Returns `None` if the layout does not permit loading this as a value.
fn try_read_immediate_from_mplace(
&self,
@ -444,7 +444,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M>
Ok(OpTy { op, layout })
}
/// Every place can be read from, so we can turm them into an operand
/// Every place can be read from, so we can turn them into an operand
#[inline(always)]
pub fn place_to_op(
&self,
@ -500,7 +500,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M>
}
/// Evaluate the operand, returning a place where you can then find the data.
/// if you already know the layout, you can save two some table lookups
/// If you already know the layout, you can save two table lookups
/// by passing it in here.
pub fn eval_operand(
&self,

View File

@ -346,8 +346,8 @@ where
Ok(place)
}
/// Offset a pointer to project to a field. Unlike place_field, this is always
/// possible without allocating, so it can take &self. Also return the field's layout.
/// Offset a pointer to project to a field. Unlike `place_field`, this is always
/// possible without allocating, so it can take `&self`. Also return the field's layout.
/// This supports both struct and array fields.
#[inline(always)]
pub fn mplace_field(
@ -722,7 +722,7 @@ where
}
/// Write an immediate to memory.
/// If you use this you are responsible for validating that things git copied at the
/// If you use this you are responsible for validating that things got copied at the
/// right type.
fn write_immediate_to_mplace_no_validate(
&mut self,
@ -805,7 +805,7 @@ where
/// Copies the data from an operand to a place. This does not support transmuting!
/// Use `copy_op_transmute` if the layouts could disagree.
/// Also, if you use this you are responsible for validating that things git copied at the
/// Also, if you use this you are responsible for validating that things get copied at the
/// right type.
fn copy_op_no_validate(
&mut self,

View File

@ -613,7 +613,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M>
/// is an indirect operand.
/// It will error if the bits at the destination do not match the ones described by the layout.
///
/// `ref_tracking` can be None to avoid recursive checking below references.
/// `ref_tracking` can be `None` to avoid recursive checking below references.
/// This also toggles between "run-time" (no recursion) and "compile-time" (with recursion)
/// validation (e.g., pointer values are fine in integers at runtime).
pub fn validate_operand(