You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a workaround for rustfmt's insistence on ignoring the Cargo.toml edition that everything else honors, I've settled on just passing it --edition 2021 all the time, much more preferable than leaving rustfmt.toml files scattered everywhere.
However, I found that the rustic-rustfmt-args setting doesn't work with spaces. Specifically, I noticed is that this works:
(setq rustic-rustfmt-args "--edition=2021")
But this doesn't:
(setq rustic-rustfmt-args "--edition 2021")
The latter version results in the following error in a *rustfmt* buffer:
Unrecognized option: 'edition 2021'
This error can be duplicated by hand in a manual rustfmt invocation at the commandline:
My assumption is that multi-word rustic-rustfmt-args aren't being broken down into separate arguments. Per above, the workaround for a single argument is to avoid spaces by using the --x=y format. However this may not be an option for someone that has multiple separate arguments that they'd like to pass (like say --color=never --edition=2021?).
The text was updated successfully, but these errors were encountered:
As a workaround for
rustfmt
's insistence on ignoring the Cargo.tomledition
that everything else honors, I've settled on just passing it--edition 2021
all the time, much more preferable than leavingrustfmt.toml
files scattered everywhere.However, I found that the
rustic-rustfmt-args
setting doesn't work with spaces. Specifically, I noticed is that this works:But this doesn't:
The latter version results in the following error in a
*rustfmt*
buffer:This error can be duplicated by hand in a manual
rustfmt
invocation at the commandline:My assumption is that multi-word
rustic-rustfmt-args
aren't being broken down into separate arguments. Per above, the workaround for a single argument is to avoid spaces by using the--x=y
format. However this may not be an option for someone that has multiple separate arguments that they'd like to pass (like say--color=never --edition=2021
?).The text was updated successfully, but these errors were encountered: