Skip to content

Commit 85fe2b1

Browse files
Adjust LayoutData::uninhabited doc comment.
Co-authored-by: Jubilee <workingjubilee@gmail.com>
1 parent bdc321b commit 85fe2b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_abi/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1695,8 +1695,8 @@ pub struct LayoutData<FieldIdx: Idx, VariantIdx: Idx> {
16951695
pub largest_niche: Option<Niche>,
16961696
/// Is this type known to be uninhabted?
16971697
///
1698-
/// This is separate from BackendRepr, because an uninhabited return type may require special
1699-
/// consideration based on its size or other attributes.
1698+
/// This is separate from BackendRepr because uninhabited return types can affect ABI,
1699+
/// especially in the case of by-pointer struct returns, which allocate stack even when unused.
17001700
pub uninhabited: bool,
17011701

17021702
pub align: AbiAndPrefAlign,

0 commit comments

Comments
 (0)