Skip to main content

Module def_id

Module def_id 

Source
Expand description

This module contains the type definition for DefId and the types DefId depends on.

This is purposely a very small isolated module: hax-engine-names-extract uses those types, but we don’t want hax-engine-names-extract to have a build dependency on the whole frontend, that double the build times for the Rust part of hax.

Structs§

DefId
Reflects rustc_hir::def_id::DefId, augmented to also give ids to promoted constants (which have their own ad-hoc numbering scheme in rustc for now).
DefIdContents
DisambiguatedDefPathItem
Reflects [rustc_hir::definitions::DisambiguatedDefPathData]
ByteSymbol
Like Symbol, but for byte strings. ByteSymbol is used less widely, so it has fewer operations defined than Symbol.
MacroKinds
A set of macro kinds, for macros that can have more than one kind
PromotedId
Symbol
An interned UTF-8 string.

Enums§

DefIdBase
DefKind
Reflects rustc_hir::def::DefKind
DefPathItem
Reflects [rustc_hir::definitions::DefPathData]
CtorKind
What kind of constructor something is.
CtorOf
Encodes if a DefKind::Ctor is the constructor of an enum variant or a struct.
Mutability
Safety

Constants§

SYNTHETIC_CRATE_NAME 🔒
The crate name under which synthetic items are exported under.

Functions§

get_def_kind 🔒
Gets the kind of the definition. Can’t use def_kind directly because this crashes on the crate root.