Skip to main content

get_implementations

Function get_implementations 

Source
pub fn get_implementations(
    text: &str,
    position: Position,
    uri: &Uri,
    cached_program: Option<&Program>,
) -> Option<Vec<Location>>
Expand description

Find all impl Trait for Type blocks for the symbol at the cursor.

W2.5 feature 1.34 (textDocument/implementation): when the cursor is on a trait name, return every impl block in the current file that targets that trait. When the cursor is on a type name, return every impl block (and extend block) whose target type matches.

LSP-K (audit §D regression flow): when the cursor is on a trait-method name (inside the trait body, either Required signature or Default method), return every matching impl-method body location across all impl blocks in the current file that target the enclosing trait. This is the trait-method → impl-method jump the audit §A.1 surfaced as returning null.

This is a current-file-only enumeration; cross-workspace impl discovery is part of the broader workspace-symbol indexing work tracked in W2.6/W2.7.