rustfix
rustfix copied to clipboard
Original text missing leading character in Suggestion
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
Ping?
This is a valid bug, but I'm not sure if folks are actively hacking on rustfix right now. PRs to fix this will be accepted.
OK. I'll dig into it when I get a chance.