Function rustc_const_eval::lookup_const_by_id
[−]
[src]
pub fn lookup_const_by_id<'a, 'tcx: 'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
def_id: DefId,
substs: &'tcx Substs<'tcx>)
-> Option<(&'tcx Expr, &'a TypeckTables<'tcx>)>
🔬 This is a nightly-only experimental API. (
rustc_private
)def_id
is the id of the constant.substs
is the monomorphized substitutions for the expression.
substs
is optional and is used for associated constants.
This generally happens in late/trans const evaluation.