mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Submodule is enum
This commit is contained in:
parent
17a88928f4
commit
44d8919384
3 changed files with 67 additions and 21 deletions
|
@ -164,6 +164,13 @@ impl ModuleSource {
|
|||
}
|
||||
}
|
||||
|
||||
fn file_id(self) -> FileId {
|
||||
match self {
|
||||
ModuleSource::File(f) => f,
|
||||
ModuleSource::Inline(ptr) => ptr.file_id(),
|
||||
}
|
||||
}
|
||||
|
||||
fn resolve(self, db: &impl SyntaxDatabase) -> ModuleSourceNode {
|
||||
match self {
|
||||
ModuleSource::File(file_id) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue