@@ -6,7 +6,6 @@ use chalk_ir::IntTy;
6
6
use chalk_ir:: Scalar ;
7
7
use chalk_ir:: UintTy ;
8
8
use chalk_ir:: { FloatTy , Safety } ;
9
- use codeql_extractor:: trap:: Location ;
10
9
use itertools:: Itertools ;
11
10
use ra_ap_base_db:: CrateGraph ;
12
11
use ra_ap_base_db:: CrateId ;
@@ -78,29 +77,16 @@ pub fn extract_crate_graph(trap_provider: &trap::TrapFileProvider, db: &RootData
78
77
continue ;
79
78
}
80
79
let krate = & crate_graph[ krate_id] ;
81
- let module = emit_module (
80
+ let root_module = emit_module (
82
81
& crate_graph,
83
82
db,
84
83
db. crate_def_map ( krate_id) . as_ref ( ) ,
85
84
"crate" ,
86
85
DefMap :: ROOT ,
87
86
& mut trap,
88
87
) ;
89
- let file_label = trap. emit_file ( root_module_file) . as_untyped ( ) ;
90
- let location_label = codeql_extractor:: extractor:: location_label (
91
- & mut trap. writer ,
92
- Location {
93
- file_label,
94
- start_line : 0 ,
95
- start_column : 0 ,
96
- end_line : 0 ,
97
- end_column : 0 ,
98
- } ,
99
- ) ;
100
- trap. writer . add_tuple (
101
- "locatable_locations" ,
102
- vec ! [ module. into( ) , location_label. into( ) ] ,
103
- ) ;
88
+ let file_label = trap. emit_file ( root_module_file) ;
89
+ trap. emit_file_only_location ( file_label, root_module) ;
104
90
105
91
let element = generated:: Crate {
106
92
id : trap:: TrapId :: Key ( format ! ( "{}:{hash}" , root_module_file. display( ) ) ) ,
@@ -109,7 +95,7 @@ pub fn extract_crate_graph(trap_provider: &trap::TrapFileProvider, db: &RootData
109
95
. as_ref ( )
110
96
. map ( |x| x. canonical_name ( ) . to_string ( ) ) ,
111
97
version : krate. version . to_owned ( ) ,
112
- module : Some ( module ) ,
98
+ module : Some ( root_module ) ,
113
99
cfg_options : krate
114
100
. cfg_options
115
101
. as_ref ( )
0 commit comments