Skip to main content

add_doc_link_edits

Function add_doc_link_edits 

Source
pub fn add_doc_link_edits(
    plan: &mut RenamePlan,
    index: &ProjectIndex,
    doc_scope: &HashMap<String, Vec<String>>,
    snapshots: &HashMap<PathBuf, String>,
    locals: &HashMap<PathBuf, Vec<LocalBinding>>,
)
Expand description

#2456: extend plan with the doc links that resolved to the renamed symbol before the rename, across every file in snapshots. A link to the symbol itself has its last segment rewritten ([Limiter], [Limiter.decide] when decide is renamed); when a type-like symbol is renamed, a link to one of its members has its owner segment rewritten ([Limiter.decide] when Limiter is). Display text and backticks are untouched, and a link that resolves to some other definition of the same name is left alone.