Skip to content

Diagnostic suggestions highlighting can become misaligned #104150

Closed
@Alexendoo

Description

@Alexendoo

Given a cargo +nightly clippy on the following:

#[derive(Copy, Clone)]
struct Foo(bool);

impl Into<(Foo, Foo)> for Foo {
    fn into(self) -> (Foo, Foo) {
        (self, self)
    }
}

fn main() {}

The current output is:

image

In line 6, (val, val) the second highlight is misaligned, it's highlighted at (val, v~al)~

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions