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: Option<&'tcx Substs<'tcx>>) -> Option<(&'tcx Expr, Option<Ty<'tcx>>)>
Unstable (
rustc_private)def_idis the id of the constant.substsis the monomorphized substitutions for the expression.
substs is optional and is used for associated constants.
This generally happens in late/trans const evaluation.