Skip to content

Commit 6493cd8

Browse files
Adjust LayoutData::uninhabited doc comment.
Co-authored-by: Jubilee <workingjubilee@gmail.com>
1 parent 58ebf6a commit 6493cd8

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
@@ -1696,8 +1696,8 @@ pub struct LayoutData<FieldIdx: Idx, VariantIdx: Idx> {
16961696
pub largest_niche: Option<Niche>,
16971697
/// Is this type known to be uninhabted?
16981698
///
1699-
/// This is separate from BackendRepr, because an uninhabited return type may require special
1700-
/// consideration based on its size or other attributes.
1699+
/// This is separate from BackendRepr because uninhabited return types can affect ABI,
1700+
/// especially in the case of by-pointer struct returns, which allocate stack even when unused.
17011701
pub uninhabited: bool,
17021702

17031703
pub align: AbiAndPrefAlign,

0 commit comments

Comments
 (0)