File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use crate::translate::{ResolvePaths, SourceKind};
4
4
use crate :: trap:: TrapId ;
5
5
use anyhow:: Context ;
6
6
use archive:: Archiver ;
7
+ use ra_ap_base_db:: SourceDatabase ;
7
8
use ra_ap_hir:: Semantics ;
8
9
use ra_ap_ide_db:: RootDatabase ;
9
10
use ra_ap_ide_db:: line_index:: { LineCol , LineIndex } ;
@@ -301,10 +302,14 @@ fn main() -> anyhow::Result<()> {
301
302
}
302
303
} ;
303
304
}
304
- for ( _ , file) in vfs. iter ( ) {
305
+ for ( file_id , file) in vfs. iter ( ) {
305
306
if let Some ( file) = file. as_path ( ) . map ( <_ as AsRef < Path > >:: as_ref) {
306
307
if file. extension ( ) . is_some_and ( |ext| ext == "rs" )
307
308
&& processed_files. insert ( file. to_owned ( ) )
309
+ && db
310
+ . source_root ( db. file_source_root ( file_id) . source_root_id ( db) )
311
+ . source_root ( db)
312
+ . is_library
308
313
{
309
314
extractor. extract_with_semantics (
310
315
file,
You can’t perform that action at this time.
0 commit comments