Rollup merge of #94242 - compiler-errors:fat-uninhabitable-pointer, r=michaelwoerister
properly handle fat pointers to uninhabitable types Calculate the pointee metadata size by using `tcx.struct_tail_erasing_lifetimes` instead of duplicating the logic in `fat_pointer_kind`. Open to alternatively suggestions on how to fix this. Fixes #94149 r? ````@michaelwoerister```` since you touched this code last, I think!
This commit is contained in:
commit
6b03a46f27
4 changed files with 49 additions and 18 deletions
|
@ -449,7 +449,10 @@ fn pointer_or_reference_metadata<'ll, 'tcx>(
|
|||
// This is a thin pointer. Create a regular pointer type and give it the correct name.
|
||||
debug_assert_eq!(
|
||||
(thin_pointer_size, thin_pointer_align),
|
||||
cx.size_and_align_of(ptr_type)
|
||||
cx.size_and_align_of(ptr_type),
|
||||
"ptr_type={}, pointee_type={}",
|
||||
ptr_type,
|
||||
pointee_type,
|
||||
);
|
||||
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue