Module fn_info

Source

Functions§

access_ident_recursive
return the (ident, its fields) of the expr.
check_safety
check_visibility
display_hashmap
find_generic_in_ty 🔒
Iterate the args’ types recursively and find the matched generic one.
find_generic_param 🔒
Find generic type parameters in the parameter list
generate_contract_from_annotation
Get the annotation in tag-std style. Then generate the contractual invariant states (CIS) for the args. This function will recognize the args name and record states to MIR variable (represent by usize). Return value means Vec<(local_id, fields of this local, contracts)>
generate_contract_from_annotation_without_field_types
Same with generate_contract_from_annotation but does not contain field types.
generate_node_ty
get_adt_def_id_by_adt_method
get_adt_ty
get_all_mutable_methods
get_all_std_unsafe_callees
get_all_std_unsafe_callees_block_id
get_callees
get_cleaned_def_path_name
get_cons
get_impls_for_struct
get_known_std_names 🔒
We use a json to record known std apis’ arg names. This function will search the json and return the names. Notes: If std gets updated, the json may still record old ones.
get_pointee
get_public_fields
get_sp
get_sp_json
get_std_api_signature_json
get_struct_name
get_type
has_mut_self_param
is_ptr
is_re_exported
is_ref
is_slice
is_strict_ty
is_strict_ty_convert
match_primitive_type 🔒
Match built-in primitive types from String
match_std_unsafe_callee
match_ty_with_ident
Match a type identifier string to a concrete Rust type
parse_cis_local
Parse attr.expr into local id and local fields.
parse_expr_into_local_and_ty
parse single expr into (local, fields, ty)
parse_expr_into_number
parse expr into number.
parse_local_signature
Return the Vecs of args’ names and types of local functions.
parse_outside_signature 🔒
Return the Vecs of args’ names and types of outside functions.
parse_signature
Return the Vecs of args’ names and types This function will handle outside def_id by different way.
print_hashset
reflect_generic
reverse_op