Rustfmt: Error message when formatting already formatted code?

Created on 3 Aug 2017  路  2Comments  路  Source: rust-lang/rustfmt

I have Format On Save on in VSCode, and it is a reflex of mine to save a _lot_. Therefore, I often end up formatting already formatted code, and when I do, I get output like the following. Output from the tool automatically switches my bottom Toolbox view away from the Terminal or Problems tab, and is thus is quite annoying.

Request textDocument/formatting failed.
  Message: Reformat failed to complete successfully
  Code: -32603 
bug

Most helpful comment

Definitely a RLS bug - rustfmt is emitting a perfectly sensible error message and RLS is suppressing it in favor of an undocumented error code. Thanks for pointing me that way.

All 2 comments

This is probably a bug in the RLS, rather than rustfmt, but not 100% sure.

Definitely a RLS bug - rustfmt is emitting a perfectly sensible error message and RLS is suppressing it in favor of an undocumented error code. Thanks for pointing me that way.

Was this page helpful?
0 / 5 - 0 ratings