#[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.
bare_trait_objects
is now set to warn (https://github.com/rust-lang/rust/pull/61203)ellipsis_inclusive_range_patterns
will soon be set to warn (https://github.com/rust-lang/rust/pull/61342)unused_extern_crates
has open issueselided_lifetimes_in_paths
has open issues (https://github.com/rust-lang/rust/issues/60199, https://github.com/rust-lang/rust/issues/55768)This summary was last updated from this comment; check to see if there are new comments since then.
/cc @Centril @aturon @Mark-Simulacrum
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 elided_lifetime_in_path
the most, because these kinds of elided lifetimes regularly lead to hard to spot bugs.
@oberien you could modify your environment variables and add
RUSTFLAGS="$RUSTFLAGS -W rust_2018_idioms"
and you have it enabled for all your projects on your local machine.
It would be great to have bare_trait_objects
set to warn by default. I often see users in chats accidentally use trait objects when they did not intend to.
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 bare_trait_objects
to warn
and running --bless
on the tests, 300+ ui stderr files changed due to the warnings (expected after seeing the output from the previous PR ).
If there is still interest to see a crater run with deny
set, I think it's possible to run crater without CI tests passing as long as if the build succeeds.
If we continued with warn
, we could change many of the tests to use dyn
, avoiding committing too much stderr noise. Some tests would be left bare to continue testing the ui of the lint. What do you think?
@memoryruins Feel free to send in a PR for warnings and I'll FCP that one. We can crank up to deny later.
Update:
bare_trait_objects
is now set to warn https://github.com/rust-lang/rust/pull/61203ellipsis_inclusive_range_patterns
will soon be set to warn in https://github.com/rust-lang/rust/pull/61342To-do:
unused_extern_crates
has open issues that are blocking the lint from being set to warnelided_lifetimes_in_paths
has at least two open issues that might block setting it to warn,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!
elided_lifetimes_in_paths
.elided_lifetimes_in_paths
, although to my (very limited) knowledge it shouldn't affect making the lint warn-by-default.
Most helpful comment
Update:
bare_trait_objects
is now set to warn https://github.com/rust-lang/rust/pull/61203ellipsis_inclusive_range_patterns
will soon be set to warn in https://github.com/rust-lang/rust/pull/61342To-do:
unused_extern_crates
has open issues that are blocking the lint from being set to warnelided_lifetimes_in_paths
has at least two open issues that might block setting it to warn,https://github.com/rust-lang/rust/issues/60199 and https://github.com/rust-lang/rust/issues/61124
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!