Trait rustc_trait_selection::infer::canonical::ir::inherent::Const

source ·
pub trait Const<I>:
    Copy
    + Debug
    + Hash
    + Eq
    + Into<<I as Interner>::GenericArg>
    + Into<<I as Interner>::Term>
    + IntoKind<Kind = ConstKind<I>>
    + TypeSuperVisitable<I>
    + TypeSuperFoldable<I>
    + Relate<I>
    + Flags
where I: Interner<Const = Self>,
{ // Required methods fn try_to_target_usize(self, interner: I) -> Option<u64>; fn new_infer(interner: I, var: InferConst) -> Self; fn new_var(interner: I, var: ConstVid) -> Self; fn new_bound( interner: I, debruijn: DebruijnIndex, var: <I as Interner>::BoundConst, ) -> Self; fn new_anon_bound( interner: I, debruijn: DebruijnIndex, var: BoundVar, ) -> Self; fn new_unevaluated(interner: I, uv: UnevaluatedConst<I>) -> Self; fn new_expr(interner: I, expr: <I as Interner>::ExprConst) -> Self; fn new_error(interner: I, guar: <I as Interner>::ErrorGuaranteed) -> Self; // Provided methods fn new_error_with_message(interner: I, msg: impl ToString) -> Self { ... } fn is_ct_var(self) -> bool { ... } }

Required Methods§

source

fn try_to_target_usize(self, interner: I) -> Option<u64>

source

fn new_infer(interner: I, var: InferConst) -> Self

source

fn new_var(interner: I, var: ConstVid) -> Self

source

fn new_bound( interner: I, debruijn: DebruijnIndex, var: <I as Interner>::BoundConst, ) -> Self

source

fn new_anon_bound(interner: I, debruijn: DebruijnIndex, var: BoundVar) -> Self

source

fn new_unevaluated(interner: I, uv: UnevaluatedConst<I>) -> Self

source

fn new_expr(interner: I, expr: <I as Interner>::ExprConst) -> Self

source

fn new_error(interner: I, guar: <I as Interner>::ErrorGuaranteed) -> Self

Provided Methods§

source

fn new_error_with_message(interner: I, msg: impl ToString) -> Self

source

fn is_ct_var(self) -> bool

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'tcx> Const<TyCtxt<'tcx>> for Const<'tcx>

source§

fn try_to_target_usize(self, interner: TyCtxt<'tcx>) -> Option<u64>

source§

fn new_infer(tcx: TyCtxt<'tcx>, infer: InferConst) -> Const<'tcx>

source§

fn new_var(tcx: TyCtxt<'tcx>, vid: ConstVid) -> Const<'tcx>

source§

fn new_bound( interner: TyCtxt<'tcx>, debruijn: DebruijnIndex, var: BoundVar, ) -> Const<'tcx>

source§

fn new_anon_bound( tcx: TyCtxt<'tcx>, debruijn: DebruijnIndex, var: BoundVar, ) -> Const<'tcx>

source§

fn new_unevaluated( interner: TyCtxt<'tcx>, uv: UnevaluatedConst<TyCtxt<'tcx>>, ) -> Const<'tcx>

source§

fn new_expr(interner: TyCtxt<'tcx>, expr: Expr<'tcx>) -> Const<'tcx>

source§

fn new_error(interner: TyCtxt<'tcx>, guar: ErrorGuaranteed) -> Const<'tcx>

Implementors§