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.

Re-exportsΒ§

use crate::frontend::AdtInto; πŸ”’
use charon_lib::ast::HashConsed; πŸ”’
use itertools::Itertools; πŸ”’
use rustc_hash::FxHashSet as HashSet; πŸ”’
use rustc_middle::ty::CallerBoundsIterator; πŸ”’
use rustc_span::DUMMY_SP; πŸ”’
use rustc_trait_elaboration::GenericParams; πŸ”’
use rustc_trait_elaboration::param_env_from_clauses; πŸ”’
use rustc_hir as hir; πŸ”’
use rustc_hir::def_id::DefId as RDefId; πŸ”’
use rustc_middle::ty; πŸ”’
use crate::frontend::prelude::*; πŸ”’

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]
VirtualImplAssocItem
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
RAllocId
Symbol
An interned UTF-8 string.

EnumsΒ§

DefIdBase
DefKind
Reflects rustc_hir::def::DefKind
DefPathItem
Reflects [rustc_hir::definitions::DefPathData]
DerivedItemKind
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.