-
Notifications
You must be signed in to change notification settings - Fork 18
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
Embark standard lints v0.4 - require Rust 1.52 #66
Conversation
@khyperia can you test using this draft set in rust-gpu and see if there are any new lints that are problematic in it? If it is serious we could exclude it from here, or otherwise just override in that repro itself. These do work fine in ark and our modules. |
Works great in rust-gpu! Found a couple silly/small issues, too. Only thing is that this change still says |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@khyperia thanks for testing! oops had forgotten to push the latest that fixed the ending and included two new lints ( Think we can get this in today then. I did take a look at the new clippy lints in Rust 1.53 but of the 4 new none of them were that interesting for now, so think fine to settle on 1.52 as requirement for this |
Interesting choice! I've been advocating this the other way around to guarantee (by the compiler) that the return types (usually void, Other than that another nice set of lints! |
Following EmbarkStudios/rust-ecosystem#66, tame-oauth also needed to update.
Following EmbarkStudios/rust-ecosystem#66, tame-oauth also needed to update.
With these changes our standard lint set now requires Rust 1.52, and builds on Rust 1.53 / beta / nightly without warnings about renamed/changed lints.
Removals
clippy::pub_enum_variant_names
- This was removed in Rust 1.53 so can't be in our standard lint set anymore.clippy::suboptimal_flops
- Harder to read and perf degradations, see discussions in Remove lint clippy::suboptimal_flops #63 and Splitsuboptimal_flops
into smaller lints rust-lang/rust-clippy#6867Additions
Enables the following lints that we've been testing with in Ark for a few months. Many of them are somewhat low impact but low cost so just nice to have enabled.
clippy::char_lit_as_u8
clippy::checked_conversions
clippy::expl_impl_clone_on_copy
clippy::explicit_deref_methods
clippy::fallible_impl_from
clippy::float_cmp_const
clippy::implicit_clone
- More explicit have have also found redundant clones with it which is niceclippy::invalid_upcast_comparisons
clippy::manual_ok_or
clippy::mut_mut
clippy::mutex_integer
clippy::path_buf_push_overwrite
clippy::ptr_as_ptr
clippy::same_functions_in_if_condition
clippy::semicolon_if_nothing_returned
- This one is really quite pedantic and typically a bunch of small fixups. But is easy to do and keeps it explicitclippy::string_lit_as_bytes
clippy::trait_duplication_in_bounds
clippy::useless_transmute
clippy::zero_sized_map_values
Part of #59