-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Tracking issue for warning for rust_2018_idioms by default #54910
Comments
Is there an update on this? I'd like to see at least some of the new currently allow-by-default lints to become warn-by-default. Personally I'm missing |
@oberien you could modify your environment variables and add
and you have it enabled for all your projects on your local machine. |
It would be great to have |
I have a few PRs:
which, unfortunately, I don't have time for at the moment. Feel free to pick up any of them. |
After setting If there is still interest to see a crater run with If we continued with |
@memoryruins Feel free to send in a PR for warnings and I'll FCP that one. We can crank up to deny later. |
…e_patterns, r=Centril Set ellipsis_inclusive_range_patterns lint to warn Continuing rust-lang#54910, the `ellipsis_inclusive_range_patterns` lint is set to warn. r? @Centril
…e_patterns, r=Centril Set ellipsis_inclusive_range_patterns lint to warn Continuing rust-lang#54910, the `ellipsis_inclusive_range_patterns` lint is set to warn. r? @Centril
Update:
To-do:
If anyone has an interest in helping these lints be enabled, e.g. by tackling any of those potentially blocking diagnostic message issues, go for it! |
…e_patterns, r=Centril Set ellipsis_inclusive_range_patterns lint to warn Continuing rust-lang#54910, the `ellipsis_inclusive_range_patterns` lint is set to warn. r? @Centril
…e_patterns, r=Centril Set ellipsis_inclusive_range_patterns lint to warn Continuing rust-lang#54910, the `ellipsis_inclusive_range_patterns` lint is set to warn. r? @Centril
#55768 also impacts (the rustfixability of) |
Summary: This diff sets two Rust lints to warn in fbcode: ``` [rust] warn_lints = bare_trait_objects, ellipsis_inclusive_range_patterns ``` and fixes occurrences of those warnings within common/rust, hg, and mononoke. Both of these lints are set to warn by default starting with rustc 1.37. Enabling them early avoids writing even more new code that needs to be fixed when we pull in 1.37 in six weeks. Upstream tracking issue: rust-lang/rust#54910 Reviewed By: Imxset21 Differential Revision: D16200291 fbshipit-source-id: aca11a7a944e9fa95f94e226b52f6f053b97ec74
#71957 is another open issue for |
Just bumping this issue seeing #55768 and #71957 are now resolved. With a quick check, looks like the remaining issues as linked above copied here are centered around
A more recent issue opened after the linked comment: |
This should become the default in the future: rust-lang/rust#54910 Reason this is put in lib.rs instead of CI: to ensure local invocations of cargo build and cargo clippy pick up the warning. Reason this is made a warning: so that code builds and runs anyway. On the CI, the `-D warnings` clippy argument will treat it as a hard error.
This should become the default in the future: rust-lang/rust#54910 Reason this is put in lib.rs instead of CI: to ensure local invocations of cargo build and cargo clippy pick up the warning. Reason this is made a warning: so that code builds and runs anyway. On the CI, the `-D warnings` clippy argument will treat it as a hard error.
Quick note: |
I tried denying |
#[warn(rust_2018_idioms)]
is not going to be enabled by default for Rust 2018 because we are taking a conservative stance and we aren't sure about how good the suggestions are yet.The plan is to enable this lint by default some number of releases / months after Rust 2018 ships.
Progress
bare_trait_objects
is now set to warn (Warn on bare_trait_objects by default #61203)ellipsis_inclusive_range_patterns
will soon be set to warn (Set ellipsis_inclusive_range_patterns lint to warn #61342)unused_extern_crates
has open issueselided_lifetimes_in_paths
lints #91639elided_lifetimes_in_paths
has open issues (Multiple anonymous lifetimes bounds upset compiler #60199, 2018 idioms: duplicate suggestion for anonymous lifetime #55768)extern crate
removal #56328This summary was last updated from this comment; check to see if there are new comments since then.
/cc @Centril @aturon @Mark-Simulacrum
The text was updated successfully, but these errors were encountered: