-
Notifications
You must be signed in to change notification settings - Fork 286
Description
Fix all remaining clippy warnings. Then we can test cargo clippy in CI to keep it that way.
-
vast majority of
clippywarnings: Fix Clippy lints #460 -
clippy::duplicate_underscore_argument
Fix theclippy::duplicate_underscore_argumentwarning #497 -
clippy::large_enum_variant
Fix theclippy::large_enum_variantwarnings that are simple byBoxing them #508
Allow the lastclippy::large_enum_variantwarning #509 -
clippy::type_complexity
Fixed remainingclippy::type_complexitywarnings by refactoring tuples into structs #467 -
clippy::borrowed_box
Fixed remainingclippy::borrowed_boxwarnings #476 -
clippy::vec_box
Locally allowclippy::vec_boxwarnings #499 (locally allowed)
Fixing this would be a massive change. It cascades to basically remove every unneededBox, which is generally good, but some of these types,Expr,Type,Item, are big, around 400 bytes, so the extramemcpys might not be worth it, but who knows. But also there are a ton of unnecessary allocations happening currently. The best possible solution would probably be to re-introduce a type likeP, which was inlibsyntaxinrustcI believe, and which was arena-allocated. ButsynusesBoxes, so we're kinda stuck as I don't thinksyn's types have anA: Allocatorgeneric. The other alternative is just to#![allow(clippy::vec_box)], or at least do it locally on the few individual warnings. Maybe we should do that until more refactoring of the transpiler is done to de-duplicate a lot of it and add better APIs. -
clippy::if_same_then_else
Fixed some of the remainingclippywarnings that needed slightly more complex refactors. #462
For the remaining case, I'm not sure why this is the same in both branches. Should ask about before fixing, so it remains a warning for now.
Fixed theclippy::if_same_then_elsewarning #498 -
clippy::same_item_push
Fixed some of the remainingclippywarnings that needed slightly more complex refactors. #462 -
clippy::needless_bool
Fixed some of the remainingclippywarnings that needed slightly more complex refactors. #462