Module chalk_solve::rust_ir[][src]

Expand description

Contains the definition for the “Rust IR” – this is basically a “lowered” version of the AST, roughly corresponding to [the HIR] in the Rust compiler.

Structs

Represents an alias equality bound on e.g. a type or type parameter. Does not know anything about what it’s binding.

Represents an associated type declaration found inside of a trait:

Encodes the parts of AssociatedTyDatum where the parameters P0..Pm are in scope (bounds and where_clauses).

Represents the value of an associated type that is assigned from within some impl.

Identifier for an “associated type value” found in some impl.

A rust intermediate represention (rust_ir) of a function definition/declaration. For example, in the following rust code:

Represents the bounds on a FnDefDatum, including the function definition’s type signature and where clauses.

Represents the inputs and outputs on a FnDefDatum. This is split from the where clauses, since these can contain bound lifetimes.

Represents a generator type.

The nested types for a generator. This always appears inside a GeneratorDatum

The generator witness data. Each GeneratorId has both a GeneratorDatum and a GeneratorWitnessDatum - these represent two distinct types in Rust. GeneratorWitnessDatum is logically ‘inside’ a generator - this only matters when we treat the witness type as a ’constituent type for the purposes of determining auto trait implementations.

The generator witness types, together with existentially bound lifetimes. Each ‘witness type’ represents a type stored inside the generator across a yield. When a generator type is constructed, the precise region relationships found in the generator body are erased. As a result, we are left with existential lifetimes - each type is parameterized over some lifetimes, but we do not know their precise values.

Represents the bounds for an impl Trait type.

Represents a trait bound on e.g. a type or type parameter. Does not know anything about what it’s binding.

A rust intermediate representation (rust_ir) of a Trait Definition. For example, given the following rust code:

Enums

Indicates the “most permissive” Fn-like trait that the closure implements. If the closure kind for a closure is FnMut, for example, then the closure implements FnMut and FnOnce.

An inline bound, e.g. : Foo<K> in impl<K, T: Foo<K>> SomeType<T>.

A list of the traits that are “well known” to chalk, which means that the chalk-solve crate has special, hard-coded impls for them.

Traits

Type Definitions