-
Notifications
You must be signed in to change notification settings - Fork 971
Closed
Description
When I run,
echo '
fn foo ( ) {
fake_fn("this is fine");
fake_fn ( "This not so much" ) ;
}
' | rustfmt --checkthe output is equivalent to rustfmt --emit stdout. Ideally, I would like to see the above call emit something like,
Diff in 'stdin' at line 1:
-fn foo ( ) {
+fn foo() {
fake_fn("this is fine");
- fake_fn ( "This not so much" ) ;
+ fake_fn("This not so much");
}If that's not possible, a warning or error message noting the ignored option would make this behavior less surprising, and may help nudge users towards valid usage.
It might also be worth noting that rustfmt +nightly --emit json is silently ignored in the same situations.
$ rustfmt --version
rustfmt 1.4.4-stable (0462008d 2019-08-06)
$ rustfmt +nightly --version
rustfmt 1.4.9-nightly (33e36670 2019-10-07)
Metadata
Metadata
Assignees
Labels
No labels