properly handle fat pointers to uninhabitable types

This commit is contained in:
Michael Goulet
2022-02-23 08:11:50 -08:00
parent c651ba8a54
commit c73a2f8a65
4 changed files with 49 additions and 18 deletions

View File

@@ -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 {