* Resolve a Rust qualified reference `A::B::C` to the item module `A::B` * holds by the name `C` (rustPathTarget walks the modules as Rust does). This * is the Rust analog of resolvePythonModuleMember / * resolveGoCrossPackageReference and the precise answer to common-name * re-e
( ref: UnresolvedRef, context: ResolutionContext )
| 4198 | * associated-function calls and enum-variant paths fall through untouched. |
| 4199 | */ |
| 4200 | function resolveRustPathReference( |
| 4201 | ref: UnresolvedRef, |
| 4202 | context: ResolutionContext |
| 4203 | ): ResolvedRef | null { |
| 4204 | const target = rustPathTarget(ref, context); |
| 4205 | return target ? { original: ref, targetNodeId: target.id, confidence: 0.9, resolvedBy: 'import' } : null; |
| 4206 | } |
| 4207 | |
| 4208 | /** The languages a Java or Kotlin import can name a declaration in: either of them. */ |
| 4209 | const JVM_IMPORT_LANGUAGES: ReadonlySet<string> = new Set(['java', 'kotlin']); |