Skip to main content

resolve_const_item_value

Function resolve_const_item_value 

Source
pub(crate) fn resolve_const_item_value<'tcx>(
    tcx: TyCtxt<'tcx>,
    name: &str,
) -> Option<u128>
Expand description

Resolve a const item (e.g. const CAPACITY: usize = 2 * B - 1) by name in the local crate to its evaluated unsigned-integer value, for use in the contract DSL (ValidNum(len <= CAPACITY)).