Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rustfmt configuration for current toolchains #235

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ecton
Copy link

@ecton ecton commented Mar 5, 2020

The goal of this PR is to configure rustfmt so that it can safely be run on this project, and bundle any associated formatting changes into one PR.

@ecton
Copy link
Author

ecton commented Mar 5, 2020

The output of the stable version of rustfmt after removing max_width was:

Warning: Unknown configuration option `fn_args_density`
Warning: Unknown configuration option `reorder_extern_crates`
Warning: Unknown configuration option `reorder_extern_crates_in_group`
Warning: Unknown configuration option `reorder_imported_names`
Warning: Unknown configuration option `reorder_imports_in_group`
Warning: can't set `spaces_around_ranges = true`, unstable features are only available in nightly channel.
Warning: can't set `error_on_line_overflow = false`, unstable features are only available in nightly channel.

error_on_line_overflow doesn't appear to affect this project, but spaces_around_ranges requires the nightly version of rustfmt. I removed the options that are unknown. Do you want to keep the requirement on using the nightly toolchain?

The only reason I ask is because I'm using rust-analyzer in my daily development, and I can't seem to configure it to work with the nightly toolchain (short of building it myself). Still, I'm willing to run cargo +nightly fmt before pushing changes if you would prefer not to change that.

Let me know what your thoughts are!

@kvark
Copy link
Collaborator

kvark commented Mar 5, 2020

Thank you for the PR!
We should definitely be using the nightly rustfmt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants