fn report_all_calls(loader: &Loader, report_path: &Path) {
    let def_paths = loader.load_def_paths();
    let terminators_call_const_target = loader.load_terminators_call_const_target();
    let terminators_call_const_target: HashMap<_, _> =
        terminators_call_const_target.iter().copied().collect();
    let strings = loader.load_strings();
    let abis = loader.load_abis();
    let trait_items = loader.load_trait_items();
    let trait_items: HashSet<_> = trait_items
        .iter()
        .map(|(_trait_id, def_path, _defaultness)| def_path)
        .collect();
    let summary_keys = loader.load_summary_keys();

    let all_calls = loader.load_terminators_call();
    let all_calls = all_calls.iter().map(
        |&(_block, call, func, unsafety, abi, _return_ty, _destination, _cleanup, _span)| {
            let (call_target, is_trait_item) = if let Some(target) =
                terminators_call_const_target.get(&call)
            {
                let (_crate_name, _crate_hash, _relative_def_path, _def_path_hash, summary_key) =
                    def_paths[*target];
                (
                    strings[summary_keys[summary_key]].as_ref(),
                    trait_items.contains(target),
                )
            } else {
                ("non-const", false)
            };
            (
                call,
                func,
                unsafety.to_string(),
                strings[abis[abi]].to_string(),
                call_target,
                is_trait_item,
            )
        },
    );
    write_csv!(report_path, all_calls);
}
/// Report information about all calls in our codebase.
Report information about all calls in our codebase.
Report information about all calls in our codebase .
fn report_all_calls(loader: &Loader, report_path: &Path) {
    let def_paths = loader.load_def_paths();
    let terminators_call_const_target = loader.load_terminators_call_const_target();
    let terminators_call_const_target: HashMap<_, _> =
        terminators_call_const_target.iter().copied().collect();
    let strings = loader.load_strings();
    let abis = loader.load_abis();
    let trait_items = loader.load_trait_items();
    let trait_items: HashSet<_> = trait_items
        .iter()
        .map(|(_trait_id, def_path, _defaultness)| def_path)
        .collect();
    let summary_keys = loader.load_summary_keys();
    let all_calls = loader.load_terminators_call();
    let all_calls = all_calls.iter().map(
        |&(_block, call, func, unsafety, abi, _return_ty, _destination, _cleanup, _span)| {
            let (call_target, is_trait_item) = if let Some(target) =
                terminators_call_const_target.get(&call)
            {
                let (_crate_name, _crate_hash, _relative_def_path, _def_path_hash, summary_key) =
                    def_paths[*target];
                (
                    strings[summary_keys[summary_key]].as_ref(),
                    trait_items.contains(target),
                )
            } else {
                ("non-const", false)
            };
            (
                call,
                func,
                unsafety.to_string(),
                strings[abis[abi]].to_string(),
                call_target,
                is_trait_item,
            )
        },
    );
    write_csv!(report_path, all_calls);
}
fn report_all_calls ( loader : & Loader , report_path : & Path ) { let def_paths = loader . load_def_paths ( ) ; let terminators_call_const_target = loader . load_terminators_call_const_target ( ) ; let terminators_call_const_target : HashMap < _ , _ > = terminators_call_const_target . iter ( ) . copied ( ) . collect ( ) ; let strings = loader . load_strings ( ) ; let abis = loader . load_abis ( ) ; let trait_items = loader . load_trait_items ( ) ; let trait_items : HashSet < _ > = trait_items . iter ( ) . map ( | ( _trait_id , def_path , _defaultness ) | def_path ) . collect ( ) ; let summary_keys = loader . load_summary_keys ( ) ; let all_calls = loader . load_terminators_call ( ) ; let all_calls = all_calls . iter ( ) . map ( | & ( _block , call , func , unsafety , abi , _return_ty , _destination , _cleanup , _span ) | { let ( call_target , is_trait_item ) = if let Some ( target ) = terminators_call_const_target . get ( & call ) { let ( _crate_name , _crate_hash , _relative_def_path , _def_path_hash , summary_key ) = def_paths [ * target ] ; ( strings [ summary_keys [ summary_key ] ] . as_ref ( ) , trait_items . contains ( target ) , ) } else { ( " " , false ) } ; ( call , func , unsafety . to_string ( ) , strings [ abis [ abi ] ] . to_string ( ) , call_target , is_trait_item , ) } , ) ; write_csv ! ( report_path all_calls ) ; }
Report information about all calls in our codebase.
Report information about all calls in our codebase .
loader
&Loader
report_path
&Path