@@ -32,7 +32,6 @@ pub struct CrateTranslator<'a> {
32
32
krate : & ' a Crate ,
33
33
vfs : & ' a Vfs ,
34
34
archiver : & ' a Archiver ,
35
- extract_dependencies : bool ,
36
35
file_labels : HashMap < PathBuf , FileData > ,
37
36
}
38
37
@@ -43,15 +42,13 @@ impl CrateTranslator<'_> {
43
42
krate : & ' a Crate ,
44
43
vfs : & ' a Vfs ,
45
44
archiver : & ' a Archiver ,
46
- extract_dependencies : bool ,
47
45
) -> CrateTranslator < ' a > {
48
46
CrateTranslator {
49
47
db,
50
48
trap,
51
49
krate,
52
50
vfs,
53
51
archiver,
54
- extract_dependencies,
55
52
file_labels : HashMap :: new ( ) ,
56
53
}
57
54
}
@@ -942,17 +939,11 @@ impl CrateTranslator<'_> {
942
939
let name = function. name ( self . db ) ;
943
940
let location = self . emit_location ( function) ;
944
941
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
+
956
947
labels. push ( self . trap . emit ( generated:: Function {
957
948
id : trap_key ! [ module_label, name. as_str( ) ] ,
958
949
location,
0 commit comments