Skip to content

Unexpected lines highlighted in Rust after chain method removalΒ #937

@petr-tik

Description

@petr-tik

Thanks for reporting a bug! Please include all of the following:

(1) A description of the issue. A screenshot is often helpful too.

I renamed the variable and removed the last chained method call and I expected difft to only highlight that, instead all intermediate (unchanged) method calls in the chain are highlighted

Image

(2) A copy of what you're diffing. If you're diffing files, include the before and after files.
See the screenshot above

If you're using difftastic with a VCS repository (e.g. git), include the URL and commit hash.

you should be able to repro here
https://github.com/LucioFranco/jj-spr/blob/93b0f224f477d01a753748e3390fa107917ef0f6/spr/src/github.rs#L354-L367

using difftastic with jj configured so
ui.diff-formatter = ["difft", "--color=always", "$left", "$right"]

(3) The version of difftastic you're using (see difft --version) and your operating system.

Difftastic 0.63.0

Toolchain: 1.83.0
System:    linux x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions