const_type_layout/impls/core/
convert.rs

1use crate::{
2    typeset::{tset, ComputeTypeSet, ExpandTypeSet},
3    TypeLayout, TypeLayoutInfo, TypeStructure,
4};
5
6unsafe impl TypeLayout for core::convert::Infallible {
7    type Inhabited = crate::inhabited::Uninhabited;
8
9    const TYPE_LAYOUT: TypeLayoutInfo<'static> = TypeLayoutInfo {
10        name: ::core::any::type_name::<Self>(),
11        size: ::core::mem::size_of::<Self>(),
12        alignment: ::core::mem::align_of::<Self>(),
13        structure: TypeStructure::Enum {
14            repr: "",
15            variants: &[],
16        },
17    };
18}
19
20unsafe impl ComputeTypeSet for core::convert::Infallible {
21    type Output<T: ExpandTypeSet> = tset![.. @ T];
22}