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};
44use crate :: trap:: TrapId ;
55use anyhow:: Context ;
66use archive:: Archiver ;
7+ use ra_ap_base_db:: SourceDatabase ;
78use ra_ap_hir:: Semantics ;
89use ra_ap_ide_db:: RootDatabase ;
910use ra_ap_ide_db:: line_index:: { LineCol , LineIndex } ;
@@ -301,10 +302,14 @@ fn main() -> anyhow::Result<()> {
301302 }
302303 } ;
303304 }
304- for ( _ , file) in vfs. iter ( ) {
305+ for ( file_id , file) in vfs. iter ( ) {
305306 if let Some ( file) = file. as_path ( ) . map ( <_ as AsRef < Path > >:: as_ref) {
306307 if file. extension ( ) . is_some_and ( |ext| ext == "rs" )
307308 && 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
308313 {
309314 extractor. extract_with_semantics (
310315 file,
You can’t perform that action at this time.
0 commit comments