UnevaluatedConstKind in rustc_middle::ty::consts - Rust
Description: API documentation for the Rust `UnevaluatedConstKind` type in crate `rustc_middle`.

Skip to main content

## UnevaluatedConstKind

# Type Alias UnevaluatedConstKind

Source

    pub type UnevaluatedConstKind<'tcx> = UnevaluatedConstKind<TyCtxt<'tcx>>;

## Aliased Type§

    pub enum UnevaluatedConstKind<'tcx> {
        Projection {
            def_id: DefId,
        },
        Inherent {
            def_id: DefId,
        },
        Free {
            def_id: DefId,
        },
        Anon {
            def_id: DefId,
        },
    }

## Variants§

§

### Projection

A projection `<Type as Trait>::AssocConst`

#### Fields

§`def_id: DefId`
§

### Inherent

An associated constant in an inherent `impl`

#### Fields

§`def_id: DefId`
§

### Free

A free constant, outside an impl block.

#### Fields

§`def_id: DefId`
§

### Anon

Anonymous constant, e.g. the `1 + 2` in `[u8; 1 + 2]`.

#### Fields

§`def_id: DefId`

## Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.