Skip to content

cargo fix: Original text missing leading character in Suggestion #13024

Open
@jsgf

Description

@jsgf

The suggestion original line snippets are missing the first character on multiline fixes.

For example, a clippy warning about a redundant return at https://github.com/facebookexperimental/eden/blob/139717db04a9a28fca7f3d81553275198bbbb8a1/eden/mononoke/sshrelay/src/lib.rs#L165
shows a fix with the original text:

return Err(io::Error::new(\n                       io::ErrorKind::InvalidInput,\n                       \"bad ssh stream\",\n                   ))

but the leading space on the lines after the first is one less than the actual indent in the file.

Detailed repro: https://gist.github.com/jsgf/5760b514af320de4c06db0ca1e43a1d4

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugCommand-fixS-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions