[][src]Function ra_ap_syntax::algo::diff

pub fn diff(from: &SyntaxNode, to: &SyntaxNode) -> TreeDiff

Finds minimal the diff, which, applied to from, will result in to.

Specifically, returns a map whose keys are descendants of from and values are descendants of to, such that replace_descendants(from, map) == to.

A trivial solution is a singleton map { from: to }, but this function tries to find a more fine-grained diff.