fn arg_attrs_for_rust_scalar<'tcx>(
cx: LayoutCx<'tcx>,
scalar: Scalar,
layout: TyAndLayout<'tcx>,
offset: Size,
is_return: bool,
drop_target_pointee: Option<Ty<'tcx>>,
) -> ArgAttributesExpand description
Returns argument attributes for a scalar argument.
drop_target_pointee, if set, causes pointer-typed scalars to be treated like mutable
references to the given type. This is used to special-case the argument of ptr::drop_in_place,
interpreting it as &mut T instead of *mut T, for the purposes of attributes (which is valid
as per its safety contract). If drop_target_pointee is set, offset must be 0 and layout.ty
must be a pointer to the given type. Note that for wide pointers this function is called twice
– once for the data pointer and once for the vtable pointer. drop_target_pointee must only
be set for the data pointer.