{# #}
Note: Most layout information is completely {#+ #}
unstable and may even differ between compilations. {#+ #}
The only exception is types with certain repr(...)
{#+ #}
attributes. Please see the Rust Reference's {#+ #}
“Type Layout” {#+ #}
chapter for details on type layout guarantees. {# #}
Size: {{+ type_layout_size|safe }}
{# #} {% if !variants.is_empty() %}{# #} Size for each variant: {# #}
{# #}{{ name }}
: {#+ #}
{{ layout_size|safe }}
{# #} Note: Unable to compute type layout, {#+ #} possibly due to this type having generic parameters. {#+ #} Layout can only be computed for concrete, fully-instantiated types. {# #}
{# #} {# This kind of error probably can't happen with valid code, but we don't want to panic and prevent the docs from building, so we just let the user know that we couldn't compute the layout. #} {% when Err(LayoutError::SizeOverflow(_)) %}{# #} Note: Encountered an error during type layout; {#+ #} the type was too big. {# #}
{# #} {% when Err(LayoutError::ReferencesError(_)) %}{# #} Note: Encountered an error during type layout; {#+ #} the type references errors. {# #}
{# #} {% when Err(LayoutError::NormalizationFailure(_, _)) %}{# #} Note: Encountered an error during type layout; {#+ #} the type failed to be normalized. {# #}
{# #} {% when Err(LayoutError::Cycle(_)) %}{# #} Note: Encountered an error during type layout; {#+ #} the type's layout depended on the type's layout itself. {# #}
{# #} {% endmatch %}