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

Unstable feature warnings are printed multiple times #3872

Open
rossmacarthur opened this issue Oct 18, 2019 · 2 comments
Open

Unstable feature warnings are printed multiple times #3872

rossmacarthur opened this issue Oct 18, 2019 · 2 comments
Labels
bug Panic, non-idempotency, invalid code, etc.

Comments

@rossmacarthur
Copy link

rossmacarthur commented Oct 18, 2019

When I run cargo fmt on stable the warnings about unstable features seem to be printed multiple times, one for each file that is being linted.

Warning: can't set `wrap_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `normalize_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `normalize_doc_attributes = true`, unstable features are only available in nightly channel.
Warning: can't set `format_strings = true`, unstable features are only available in nightly channel.
Warning: can't set `merge_imports = true`, unstable features are only available in nightly channel.
Warning: can't set `reorder_impl_items = true`, unstable features are only available in nightly channel.
Warning: can't set `condense_wildcard_suffixes = true`, unstable features are only available in nightly channel.
Warning: can't set `unstable_features = true`, unstable features are only available in nightly channel.
Warning: can't set `wrap_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `normalize_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `normalize_doc_attributes = true`, unstable features are only available in nightly channel.
Warning: can't set `format_strings = true`, unstable features are only available in nightly channel.
Warning: can't set `merge_imports = true`, unstable features are only available in nightly channel.
Warning: can't set `reorder_impl_items = true`, unstable features are only available in nightly channel.
...
@calebcartwright
Copy link
Member

Do you have multiple rustfmt config files by any chance?

@topecongiro topecongiro added the bug Panic, non-idempotency, invalid code, etc. label Oct 19, 2019
@topecongiro
Copy link
Contributor

We should handle these kinds of errors and warnings more deliberately. In this particular case, instead of eprintln!-ing each warning, we should store them to a map and emit them afterward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants