review feedback: comments and spacing

This commit is contained in:
Ralf Jung 2019-11-25 22:45:00 +01:00
parent be079117f0
commit d0b983307b
2 changed files with 5 additions and 3 deletions

View File

@ -2529,8 +2529,9 @@ where
attrs.pointee_align = Some(pointee.align);
// `Box` (`UniqueBorrowed`) are not necessarily dereferencable
// for the entire duration of the function, so set their size to 0.
attrs.pointee_size = match kind {
// for the entire duration of the function as they can be deallocated
// any time. Set their valid size to 0.
attrs.pointee_size = match kind {
PointerKind::UniqueOwned => Size::ZERO,
_ => pointee.size
};

View File

@ -69,7 +69,8 @@ mod attr_impl {
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub struct ArgAttributes {
pub regular: ArgAttribute,
/// The dereferenceable size of the pointee.
/// The minimum size of the pointee, guaranteed to be valid for the duration of the whole call
/// (corresponding to LLVM's dereferenceable and dereferenceable_or_null attributes).
pub pointee_size: Size,
pub pointee_align: Option<Align>
}