Programmatically convert some of the pat ctors
This commit is contained in:
parent
f0f224a37f
commit
ff0c31e6b9
77 changed files with 136 additions and 168 deletions
|
@ -623,7 +623,7 @@ fn fn_abi_new_uncached<'tcx>(
|
|||
let is_return = arg_idx.is_none();
|
||||
let is_drop_target = is_drop_in_place && arg_idx == Some(0);
|
||||
let drop_target_pointee = is_drop_target.then(|| match ty.kind() {
|
||||
ty::RawPtr(ty::TypeAndMut { ty, .. }) => *ty,
|
||||
ty::RawPtr(ty, _) => *ty,
|
||||
_ => bug!("argument to drop_in_place is not a raw ptr: {:?}", ty),
|
||||
});
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ fn layout_of_uncached<'tcx>(
|
|||
ty::Never => tcx.mk_layout(cx.layout_of_never_type()),
|
||||
|
||||
// Potentially-wide pointers.
|
||||
ty::Ref(_, pointee, _) | ty::RawPtr(ty::TypeAndMut { ty: pointee, .. }) => {
|
||||
ty::Ref(_, pointee, _) | ty::RawPtr(pointee, _) => {
|
||||
let mut data_ptr = scalar_unit(Pointer(AddressSpace::DATA));
|
||||
if !ty.is_unsafe_ptr() {
|
||||
data_ptr.valid_range_mut().start = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue