fn report_unsafe_function_spans(loader: &Loader, report_path: &Path) {
    let def_path_resolver = DefPathResolver::new(loader);
    let build_resolver = BuildResolver::new(loader);
    let span_resolver = SpanResolver::new(loader);
    let strings = loader.load_strings();
    let abis = loader.load_abis();
    let def_path_spans = loader.load_def_path_span();
    let def_path_spans: HashMap<_, _> = def_path_spans.iter().copied().collect();

    let selected_function_definitions = loader.load_selected_function_definitions();
    let unsafe_function_spans = selected_function_definitions.iter().flat_map(
        |&(build, _item, def_path, _module, visibility, unsafety, abi, _return_ty, uses_unsafe)| {
            if unsafety == types::Unsafety::Unsafe {
                Some((
                    build,
                    build_resolver.resolve(build),
                    def_path_resolver.resolve(def_path),
                    visibility.to_string(),
                    &strings[abis[abi]],
                    uses_unsafe,
                    span_resolver.resolve(def_path_spans[&def_path]),
                ))
            } else {
                None
            }
        },
    );

    write_csv!(report_path, unsafe_function_spans);
}
/// Report the spans of the selected unsafe functions.
Report the spans of the selected unsafe functions.
Report the spans of the selected unsafe functions .
fn report_unsafe_function_spans(loader: &Loader, report_path: &Path) {
    let def_path_resolver = DefPathResolver::new(loader);
    let build_resolver = BuildResolver::new(loader);
    let span_resolver = SpanResolver::new(loader);
    let strings = loader.load_strings();
    let abis = loader.load_abis();
    let def_path_spans = loader.load_def_path_span();
    let def_path_spans: HashMap<_, _> = def_path_spans.iter().copied().collect();
    let selected_function_definitions = loader.load_selected_function_definitions();
    let unsafe_function_spans = selected_function_definitions.iter().flat_map(
        |&(build, _item, def_path, _module, visibility, unsafety, abi, _return_ty, uses_unsafe)| {
            if unsafety == types::Unsafety::Unsafe {
                Some((
                    build,
                    build_resolver.resolve(build),
                    def_path_resolver.resolve(def_path),
                    visibility.to_string(),
                    &strings[abis[abi]],
                    uses_unsafe,
                    span_resolver.resolve(def_path_spans[&def_path]),
                ))
            } else {
                None
            }
        },
    );
    write_csv!(report_path, unsafe_function_spans);
}
fn report_unsafe_function_spans ( loader : & Loader , report_path : & Path ) { let def_path_resolver = DefPathResolver :: new ( loader ) ; let build_resolver = BuildResolver :: new ( loader ) ; let span_resolver = SpanResolver :: new ( loader ) ; let strings = loader . load_strings ( ) ; let abis = loader . load_abis ( ) ; let def_path_spans = loader . load_def_path_span ( ) ; let def_path_spans : HashMap < _ , _ > = def_path_spans . iter ( ) . copied ( ) . collect ( ) ; let selected_function_definitions = loader . load_selected_function_definitions ( ) ; let unsafe_function_spans = selected_function_definitions . iter ( ) . flat_map ( | & ( build , _item , def_path , _module , visibility , unsafety , abi , _return_ty , uses_unsafe ) | { if unsafety == types :: Unsafety :: Unsafe { Some ( ( build , build_resolver . resolve ( build ) , def_path_resolver . resolve ( def_path ) , visibility . to_string ( ) , & strings [ abis [ abi ] ] , uses_unsafe , span_resolver . resolve ( def_path_spans [ & def_path ] ) , ) ) } else { None } } , ) ; write_csv ! ( report_path unsafe_function_spans ) ; }
Report the spans of the selected unsafe functions.
Report the spans of the selected unsafe functions .
loader
&Loader
report_path
&Path