Expand description
This module contains type definitions that have no equivalent in Rustc.
Modules§
- full_
def 🔒 - item_
ref 🔒 - synthetic_
items 🔒
Structs§
- Adt
- ADts (
Struct,EnumandUnionmap to this). - Assoc
Const - Associated constant:
trait MyTrait { const ASSOC: usize; } - AssocFn
- Associated function:
impl MyStruct { fn associated() {} }ortrait Foo { fn associated() {} } - AssocTy
- Associated type:
trait MyTrait { type Assoc; } - Closure
- A closure, coroutine, or coroutine-closure.
- Const
- Ctor
- The constructor function of a tuple/unit struct or tuple/unit enum variant.
- Fn
- FnPointer
- FnPtr
Shape - Represents the “shape” of a function pointer, i.e. the most general signature we can obtain
from it without breaking the higher-kinded variables. E.g.
for<'a> fn(&'a u32) -> Adt<'a, u32>is considered to be an instantiation of the shapefor<'a> fn(&'a A) -> Adt<'a, B>withA=B=u32. - Foreign
Mod - An
externblock. - FullDef
- Gathers a lot of definition information about a
rustc_hir::def_id::DefId. - Generic
Param DefIds - This is a pretty criminal hack: I want to generate
ty::Genericsfor my fake items. This requiresDefIds for the generic parameters. rustc has an affordance for creating newDefIds (tcx.create_def()) but I could not figure out a way to use it that didn’t end up ICEing during metadata encoding. So instead I’m reusing theDefIds of generic parameters fromcorefunctions. - Impl
Assoc Item - An associated item in a trait impl. This can be an item provided by the trait impl, or an item that reuses the trait decl default value.
- Impl
Assoc Item Value - The item is provided by the trait impl.
- Inherent
Impl - ItemRef
- Reference to an item, with generics. Basically any mention of an item (function, type, etc) uses this.
- Item
RefContents - Contents of
ItemRef. - Mod
- Param
Env - The combination of type generics and related predicates.
- Static
- Synthetic
Item Data - Trait
- Trait
Alias - Trait alias:
trait IntIterator = Iterator<Item = i32>; - Trait
Impl - Trait
Item Binder - The binding context to use when translating a trait impl associated item.
- TyAlias
- Type alias:
type Foo = Bar;
Enums§
- Assoc
TyKind - Const
Kind - The kind of a constant item.
- Full
DefKind - Imbues
rustc_hir::def::DefKindwith a lot of extra information. - Synthetic
Item - We create some extra
DefIds to represent things that rustc doesn’t have aDefIdfor. This makes the pipeline much easier to have “real” def_ids for them, as we can then solve traits for them etc, and works well with monomorphization. - Inline
Attr
Functions§
- assoc_
items_ of - The associated items of the trait or inherent impl that owns
s, in definition order. - gen_
vtable_ sig - The vtable signature of the method, along with the state of its container.
- get_
implied_ predicates - get_
param_ env - get_
self_ predicate - get_
trait_ decl_ dyn_ self_ ty - Generates a
dyn Trait<Args.., Ty = <Self as Trait>::Ty..>type for this trait. - late_
bound_ for_ def - lifetime_
param_ name - self_
trait_ ref - translate_
full_ def - Construct the
FullDeffor this item. IfargsisSome, the returnedFullDefwill be instantiated with the provided generics. - translate_
full_ def_ kind - Construct the
FullDefKindfor this item. - type_
param_ name - vtable_
sig_ with_ dyn_ self - The signature of
method_declas stored in a vtable, i.e. with itsSelftype replaced by the givendyn Trait<..>type.