fn report_called_functions(loader: &Loader, report_path: &Path) {
    let def_path_resolver = DefPathResolver::new(loader);
    let build_resolver = BuildResolver::new(loader);
    let strings = loader.load_strings();
    let abis = loader.load_abis();

    let unsafe_block_calls = loader.load_unsafe_block_calls();
    let unsafe_block_calls = unsafe_block_calls.iter().map(
        |&(build, block, unsafe_scope, check_mode, call, unsafety, abi, _return_ty)| {
            (
                build,
                build_resolver.resolve(build),
                block,
                unsafe_scope,
                check_mode.to_string(),
                call,
                unsafety.to_string(),
                strings[abis[abi]].to_string(),
            )
        },
    );
    write_csv!(report_path, unsafe_block_calls);
    info!("reported unsafe_block_calls");

    let unsafe_block_call_counts = loader.load_unsafe_block_call_counts();
    let unsafe_block_call_counts =
        unsafe_block_call_counts
            .iter()
            .map(|&(build, unsafe_scope, check_mode, call_count)| {
                (
                    build,
                    build_resolver.resolve(build),
                    unsafe_scope,
                    check_mode.to_string(),
                    call_count,
                )
            });
    write_csv!(report_path, unsafe_block_call_counts);
    info!("reported unsafe_block_call_counts");

    let unsafe_block_no_calls = loader.load_unsafe_block_no_calls();
    let unsafe_block_no_calls = unsafe_block_no_calls.iter().map(
        |&(build, mir_body_def_path, scope, expansion_kind, check_mode, _span)| {
            (
                build,
                build_resolver.resolve(build),
                def_path_resolver.resolve(mir_body_def_path),
                scope,
                expansion_kind.to_string(),
                check_mode.to_string(),
            )
        },
    );
    write_csv!(report_path, unsafe_block_no_calls);
    info!("reported unsafe_block_no_calls");
}
/// Report how many function calls each unsafe block contains.
Report how many function calls each unsafe block contains.
Report how many function calls each unsafe block contains .
fn report_called_functions(loader: &Loader, report_path: &Path) {
    let def_path_resolver = DefPathResolver::new(loader);
    let build_resolver = BuildResolver::new(loader);
    let strings = loader.load_strings();
    let abis = loader.load_abis();
    let unsafe_block_calls = loader.load_unsafe_block_calls();
    let unsafe_block_calls = unsafe_block_calls.iter().map(
        |&(build, block, unsafe_scope, check_mode, call, unsafety, abi, _return_ty)| {
            (
                build,
                build_resolver.resolve(build),
                block,
                unsafe_scope,
                check_mode.to_string(),
                call,
                unsafety.to_string(),
                strings[abis[abi]].to_string(),
            )
        },
    );
    write_csv!(report_path, unsafe_block_calls);
    info!("reported unsafe_block_calls");
    let unsafe_block_call_counts = loader.load_unsafe_block_call_counts();
    let unsafe_block_call_counts =
        unsafe_block_call_counts
            .iter()
            .map(|&(build, unsafe_scope, check_mode, call_count)| {
                (
                    build,
                    build_resolver.resolve(build),
                    unsafe_scope,
                    check_mode.to_string(),
                    call_count,
                )
            });
    write_csv!(report_path, unsafe_block_call_counts);
    info!("reported unsafe_block_call_counts");
    let unsafe_block_no_calls = loader.load_unsafe_block_no_calls();
    let unsafe_block_no_calls = unsafe_block_no_calls.iter().map(
        |&(build, mir_body_def_path, scope, expansion_kind, check_mode, _span)| {
            (
                build,
                build_resolver.resolve(build),
                def_path_resolver.resolve(mir_body_def_path),
                scope,
                expansion_kind.to_string(),
                check_mode.to_string(),
            )
        },
    );
    write_csv!(report_path, unsafe_block_no_calls);
    info!("reported unsafe_block_no_calls");
}
fn report_called_functions ( loader : & Loader , report_path : & Path ) { let def_path_resolver = DefPathResolver :: new ( loader ) ; let build_resolver = BuildResolver :: new ( loader ) ; let strings = loader . load_strings ( ) ; let abis = loader . load_abis ( ) ; let unsafe_block_calls = loader . load_unsafe_block_calls ( ) ; let unsafe_block_calls = unsafe_block_calls . iter ( ) . map ( | & ( build , block , unsafe_scope , check_mode , call , unsafety , abi , _return_ty ) | { ( build , build_resolver . resolve ( build ) , block , unsafe_scope , check_mode . to_string ( ) , call , unsafety . to_string ( ) , strings [ abis [ abi ] ] . to_string ( ) , ) } , ) ; write_csv ! ( report_path unsafe_block_calls ) ; info ! ( " " ) ; let unsafe_block_call_counts = loader . load_unsafe_block_call_counts ( ) ; let unsafe_block_call_counts = unsafe_block_call_counts . iter ( ) . map ( | & ( build , unsafe_scope , check_mode , call_count ) | { ( build , build_resolver . resolve ( build ) , unsafe_scope , check_mode . to_string ( ) , call_count , ) } ) ; write_csv ! ( report_path unsafe_block_call_counts ) ; info ! ( " " ) ; let unsafe_block_no_calls = loader . load_unsafe_block_no_calls ( ) ; let unsafe_block_no_calls = unsafe_block_no_calls . iter ( ) . map ( | & ( build , mir_body_def_path , scope , expansion_kind , check_mode , _span ) | { ( build , build_resolver . resolve ( build ) , def_path_resolver . resolve ( mir_body_def_path ) , scope , expansion_kind . to_string ( ) , check_mode . to_string ( ) , ) } , ) ; write_csv ! ( report_path unsafe_block_no_calls ) ; info ! ( " " ) ; }
Report how many function calls each unsafe block contains.
Report how many function calls each unsafe block contains .
loader
&Loader
report_path
&Path