@@ -32,7 +32,6 @@ pub struct CrateTranslator<'a> {
3232 krate : & ' a Crate ,
3333 vfs : & ' a Vfs ,
3434 archiver : & ' a Archiver ,
35- extract_dependencies : bool ,
3635 file_labels : HashMap < PathBuf , FileData > ,
3736}
3837
@@ -43,15 +42,13 @@ impl CrateTranslator<'_> {
4342 krate : & ' a Crate ,
4443 vfs : & ' a Vfs ,
4544 archiver : & ' a Archiver ,
46- extract_dependencies : bool ,
4745 ) -> CrateTranslator < ' a > {
4846 CrateTranslator {
4947 db,
5048 trap,
5149 krate,
5250 vfs,
5351 archiver,
54- extract_dependencies,
5552 file_labels : HashMap :: new ( ) ,
5653 }
5754 }
@@ -942,17 +939,11 @@ impl CrateTranslator<'_> {
942939 let name = function. name ( self . db ) ;
943940 let location = self . emit_location ( function) ;
944941
945- let body = if self . extract_dependencies || self . krate . origin ( self . db ) . is_local ( ) {
946- let ( body, source_map) = self . db . body_with_source_map ( def. into ( ) ) ;
947- let txt = body. pretty_print ( self . db , def. into ( ) , Edition :: Edition2021 ) ;
948- log:: trace!( "{}" , & txt) ;
949- self . emit_expr ( body. body_expr , & body, & source_map)
950- } else {
951- self . trap . emit ( generated:: MissingExpr {
952- id : TrapId :: Star ,
953- location : None ,
954- } )
955- } ;
942+ let ( body, source_map) = self . db . body_with_source_map ( def. into ( ) ) ;
943+ let txt = body. pretty_print ( self . db , def. into ( ) , Edition :: Edition2021 ) ;
944+ log:: trace!( "{}" , & txt) ;
945+ let body = self . emit_expr ( body. body_expr , & body, & source_map) ;
946+
956947 labels. push ( self . trap . emit ( generated:: Function {
957948 id : trap_key ! [ module_label, name. as_str( ) ] ,
958949 location,
0 commit comments