Repository navigation
clippy: fix lints from Rust 1.100 - #339
Closed
shahmeerabdul wants to merge 1 commit into
Closed
shahmeerabdul wants to merge 1 commit into
shahmeerabdul wants to merge 1 commit into
Conversation
Rust 1.100 clippy flags duplicated attributes and loops that only index an array, which fails the lint job on main and every open PR. Drop the repeated too_many_arguments allows and iterate the arrays directly in the two tests.
Author
Author
|
Closing this, it's already fixed on main in c97ffd6. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The lint job started failing on main and on every open PR after Rust 1.100 came out on Nov 9, since CI installs the latest stable. The new clippy flags two things:
duplicated_attributes:#[allow(clippy::too_many_arguments)]is written twice onforward_full_attn_layerandapply_ffninqwen_hybrid.rs, and onnorm_pair_bind_groupandrope_meta_bufferinvulkan.rs. I removed the extra one each time. Innorm_pair_bind_groupthe extra one sat in the middle of the doc comment, so the comment is back in one piece now.needless_range_loop: two tests looped over an index just to read an array.draft_control.rsnow goes overaccept_bindirectly, andkv_cache.rsusesiter().enumerate().take(2)so it still checks the same two layers.No behaviour changes, only those six spots. With Rust 1.100,
cargo fmt --all --checkandcargo clippy --all-targets -- -D warningsare clean, and the two tests still pass.I noticed it on #337, where only the lint job was red for code that PR doesn't touch.