Skip to main content

Module resolve

Module resolve 

Source
Expand description

Expression / argument resolution: syn::Expr β†’ semantic values.

The numeric-expression layer is parsed by the pest grammar (pest_conv.rs); everything that still needs rustc’s type context or syn structure lives here: places (via place.rs), const generics, builtin integer bounds, the x.len() sugar, tag argument types/targets, and ValidNum predicates.

FunctionsΒ§

build_interval_predicates πŸ”’
expr_to_pest πŸ”’
int_type_min_max πŸ”’
outermost_type_ident πŸ”’
Extract the outermost path segment name from a syn::Type, e.g. Option from Option<NonZero<T>> or NonZero from NonZero<T>.
parse_builtin_const πŸ”’
parse_const_param πŸ”’
parse_contract_expr πŸ”’
parse_interval_predicates πŸ”’
parse_numeric_predicate πŸ”’
parse_string_interval πŸ”’
parse_target_arg πŸ”’
parse_type πŸ”’
parse_valid_num πŸ”’
resolve_ty_ident πŸ”’
Resolve a type identifier to a Ty, handling the Self keyword (which match_ty_with_ident does not understand) by delegating to resolve_type_name.
resolve_type_name πŸ”’
unwrap_array_expr πŸ”’
Extract the inner type from [T] (the SplitTransmute([T], [U]) notation), then resolve it via parse_type. The [T] argument arrives as either Expr::Array (JSON path, parsed via syn::parse_str::<Expr>) or Expr::Verbatim (source annotation path, where parse_property_arg’s type-first parse turns Type::Slice into Verbatim); both are unwrapped to the element type T.