6365: Do insertion lookahead in algo::diff r=matklad a=Veykril

This is the last blocker for #6287 after this I can update that PR to properly fix things through using `SyntaxRewriter`.

This PR also shuffles tests around a bit and adds some more.

Ideally this is just a hack until we implement a "proper" diff algorithm that approximates a minimal diff. Maybe something like [gumtree](https://github.com/GumTreeDiff/gumtree)?

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
bors[bot] 2020-11-02 17:47:08 +00:00 committed by GitHub
commit 173e45f872
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 139 additions and 59 deletions

View file

@ -613,7 +613,7 @@ fn main() {
pub struct Foo { pub a: i32, pub b: i32 }
"#,
r#"
fn some(, b: ()} {}
fn some(, b: ()) {}
fn items() {}
fn here() {}