mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Allow rust files to be used linkedProjects
This commit is contained in:
parent
55d9a533b3
commit
a2ed6837bc
21 changed files with 203 additions and 180 deletions
|
@ -121,7 +121,7 @@ impl SourceToDefCtx<'_, '_> {
|
|||
let _p = tracing::span!(tracing::Level::INFO, "SourceBinder::file_to_module_def").entered();
|
||||
let mut mods = SmallVec::new();
|
||||
for &crate_id in self.db.relevant_crates(file).iter() {
|
||||
// FIXME: inner items
|
||||
// Note: `mod` declarations in block modules cannot be supported here
|
||||
let crate_def_map = self.db.crate_def_map(crate_id);
|
||||
mods.extend(
|
||||
crate_def_map
|
||||
|
@ -129,6 +129,9 @@ impl SourceToDefCtx<'_, '_> {
|
|||
.map(|local_id| crate_def_map.module_id(local_id)),
|
||||
)
|
||||
}
|
||||
if mods.is_empty() {
|
||||
// FIXME: detached file
|
||||
}
|
||||
mods
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue