* 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 )
| 3997 | * associated-function calls and enum-variant paths fall through untouched. |
| 3998 | */ |
| 3999 | function resolveRustPathReference( |
| 4000 | ref: UnresolvedRef, |
| 4001 | context: ResolutionContext |
| 4002 | ): ResolvedRef | null { |
| 4003 | const target = rustPathTarget(ref, context); |
| 4004 | return target ? { original: ref, targetNodeId: target.id, confidence: 0.9, resolvedBy: 'import' } : null; |
| 4005 | } |
| 4006 | |
| 4007 | /** The languages a Java or Kotlin import can name a declaration in: either of them. */ |
| 4008 | const JVM_IMPORT_LANGUAGES: ReadonlySet<string> = new Set(['java', 'kotlin']); |