Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions compiler/rustc_middle/src/ty/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1165,21 +1165,6 @@ where
}
}

// Patch result if we are a MaybeDangling-like type.
if this.ty.is_like_maybe_dangling()
&& let Some(info) = result
{
result = Some(PointeeInfo {
// Mark the pointer as raw
// (thus removing noalias/readonly/etc in case of the llvm backend)
safe: None,
// Make sure we don't assert dereferenceability of the pointer.
size: Size::ZERO,
// Preserve the alignment assertion! That is required even inside `MaybeDangling`.
align: info.align,
});
}

result
}
};
Expand Down
Loading