pub fn collect_fn(&mut self, hir_fn: hir::Function) {
        // Collect type info for exposed function
        if !hir_fn.data(self.db).visibility().is_private() || self.dispatch_table.contains(hir_fn) {
            let fn_sig = hir_fn.ty(self.db).callable_sig(self.db).unwrap();

            // Collect argument types
            for ty in fn_sig.params().iter() {
                self.collect_type(self.db.type_info(ty.clone()));
            }

            // Collect return type
            let ret_ty = fn_sig.ret();
            if !ret_ty.is_empty() {
                self.collect_type(self.db.type_info(ret_ty.clone()));
            }
        }

        // Collect used types from body
        let body = hir_fn.body(self.db);
        let infer = hir_fn.infer(self.db);
        self.collect_expr(body.body_expr(), &body, &infer);
    }
/// Collects unique `TypeInfo` from the specified function signature and body.
Collects unique `TypeInfo` from the specified function signature and body.
Collects unique ` TypeInfo ` from the specified function signature and body .
pub fn collect_fn(&mut self, hir_fn: hir::Function) {
        // Collect type info for exposed function
        if !hir_fn.data(self.db).visibility().is_private() || self.dispatch_table.contains(hir_fn) {
            let fn_sig = hir_fn.ty(self.db).callable_sig(self.db).unwrap();
            // Collect argument types
            for ty in fn_sig.params().iter() {
                self.collect_type(self.db.type_info(ty.clone()));
            }
            // Collect return type
            let ret_ty = fn_sig.ret();
            if !ret_ty.is_empty() {
                self.collect_type(self.db.type_info(ret_ty.clone()));
            }
        }
        // Collect used types from body
        let body = hir_fn.body(self.db);
        let infer = hir_fn.infer(self.db);
        self.collect_expr(body.body_expr(), &body, &infer);
    }
pub fn collect_fn ( & mut self , hir_fn : hir :: Function ) { // Collect type info for exposed function if ! hir_fn . data ( self . db ) . visibility ( ) . is_private ( ) || self . dispatch_table . contains ( hir_fn ) { let fn_sig = hir_fn . ty ( self . db ) . callable_sig ( self . db ) . unwrap ( ) ; // Collect argument types for ty in fn_sig . params ( ) . iter ( ) { self . collect_type ( self . db . type_info ( ty . clone ( ) ) ) ; } // Collect return type let ret_ty = fn_sig . ret ( ) ; if ! ret_ty . is_empty ( ) { self . collect_type ( self . db . type_info ( ret_ty . clone ( ) ) ) ; } } // Collect used types from body let body = hir_fn . body ( self . db ) ; let infer = hir_fn . infer ( self . db ) ; self . collect_expr ( body . body_expr ( ) , & body , & infer ) ; }
Collects unique `TypeInfo` from the specified function signature and body.
Collects unique ` TypeInfo ` from the specified function signature and body .
&mut self
hir_fn
hir::Function
&mut self
hir_fn
hir::Function