Type Alias ConstKind

Source
pub type ConstKind<'db> = ConstKind<DbInterner<'db>>;

Aliased Type§

pub enum ConstKind<'db> {
    Param(ParamConst),
    Infer(InferConst),
    Bound(DebruijnIndex, BoundVar),
    Placeholder(Placeholder<BoundVar>),
    Unevaluated(UnevaluatedConst<DbInterner<'db>>),
    Value(ValueConst<'db>),
    Error(ErrorGuaranteed),
    Expr(ExprConst),
}

Variants§

§

Param(ParamConst)

A const generic parameter.

§

Infer(InferConst)

Infer the value of the const.

§

Bound(DebruijnIndex, BoundVar)

Bound const variable, used only when preparing a trait query.

§

Placeholder(Placeholder<BoundVar>)

A placeholder const - universally quantified higher-ranked const.

§

Unevaluated(UnevaluatedConst<DbInterner<'db>>)

An unnormalized const item such as an anon const or assoc const or free const item. Right now anything other than anon consts does not actually work properly but this should

§

Value(ValueConst<'db>)

Used to hold computed value.

§

Error(ErrorGuaranteed)

A placeholder for a const which could not be computed; this is propagated to avoid useless error messages.

§

Expr(ExprConst)

Unevaluated non-const-item, used by feature(generic_const_exprs) to represent const arguments such as N + 1 or foo(N)