pub(super) enum UniqueTypeId<'tcx> {
    Ty(Ty<'tcx>, HiddenZst),
    VariantPart(Ty<'tcx>, HiddenZst),
    VariantStructType(Ty<'tcx>, VariantIdx, HiddenZst),
    VariantStructTypeCppLikeWrapper(Ty<'tcx>, VariantIdx, HiddenZst),
    VTableTy(Ty<'tcx>, Option<PolyExistentialTraitRef<'tcx>>, HiddenZst),
}
Expand description

A unique identifier for anything that we create a debuginfo node for. The types it contains are expected to already be normalized (which is debug_asserted in the constructors).

Note that there are some things that only show up in debuginfo, like the separate type descriptions for each enum variant. These get an ID too because they have their own debuginfo node in LLVM IR.

Variants

Ty(Ty<'tcx>, HiddenZst)

The ID of a regular type as it shows up at the language level.

VariantPart(Ty<'tcx>, HiddenZst)

The ID for the single DW_TAG_variant_part nested inside the top-level DW_TAG_structure_type that describes enums and generators.

VariantStructType(Ty<'tcx>, VariantIdx, HiddenZst)

The ID for the artificial struct type describing a single enum variant.

VariantStructTypeCppLikeWrapper(Ty<'tcx>, VariantIdx, HiddenZst)

The ID for the additional wrapper struct type describing an enum variant in CPP-like mode.

VTableTy(Ty<'tcx>, Option<PolyExistentialTraitRef<'tcx>>, HiddenZst)

The ID of the artificial type we create for VTables.

Implementations

Generates a string version of this UniqueTypeId, which can be used as the UniqueId argument of the various LLVMRustDIBuilderCreate*Type() methods.

Right now this takes the form of a hex-encoded opaque hash value.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout

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: 32 bytes

Size for each variant:

  • Ty: 8 bytes
  • VariantPart: 8 bytes
  • VariantStructType: 16 bytes
  • VariantStructTypeCppLikeWrapper: 16 bytes
  • VTableTy: 32 bytes