Adding + Fixing Clippy rules to better align with #[no_std]#6570
Adding + Fixing Clippy rules to better align with #[no_std]#6570youknowone merged 12 commits intoRustPython:mainfrom
Conversation
…of_core clippy rules * Manually changed part of the code to use core/alloc
* Imported Range in vm/src/anystr.rs
|
Important Review skippedToo many files! 35 files out of 185 files are above the max files limit of 150. You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Code has been automatically formatted The code in this PR has been formatted using git pull origin main |
|
Most things were straightforward replacing In |
|
Thank you so much! And the changes in cert.rs and anystr.rs is also looking reasonable. |
|
To prevent further conflict, if you create a separated PR without the cargo.toml changes, I will immediately merge it |
Changes SummaryThis PR addresses issue #6380 by systematically migrating the RustPython codebase to prefer Type: refactoring Components Affected: codegen, common, compiler-core, compiler, derive-impl, derive, literal, sre_engine, stdlib, vm, venvlauncher, examples Files Changed
Architecture Impact
Risk Areas: Widespread import changes across 184 files could introduce subtle runtime behavior changes if core:: and std:: implementations differ, Changes to memory safety operations (mem::size_of, mem::swap, slice operations) need verification that no subtle bugs were introduced, Clippy lint enforcement (alloc_instead_of_core, std_instead_of_alloc) could break existing tooling if lints are too strict, Import reordering (as part of rustfmt) could affect code readability or introduce merge conflicts Suggestions
Full review in progress... | Powered by diffray |
Review Summary
Validated 10 issues: 4 kept (valid performance/quality concerns), 6 filtered (speculative, incorrect analysis, or low value) Issues Found: 4📊 2 unique issue type(s) across 4 location(s) 📋 Full issue list (click to expand)🟠 HIGH - Multiple expect() calls on module initialization without error handling (2 occurrences)Agent: rust Category: quality Why this matters: This pattern commonly causes runtime bugs. 📍 View all locations
Rule: 🟡 MEDIUM - Redundant cloning in tuple flattening operation (2 occurrences)Agent: performance Category: performance Why this matters: Poor performance degrades user experience. 📍 View all locations
Rule: ℹ️ 4 issue(s) outside PR diff (click to expand)
🟠 HIGH - Multiple expect() calls on module initialization without error handling (2 occurrences)Agent: rust Category: quality Why this matters: This pattern commonly causes runtime bugs. 📍 View all locations
Rule: 🟡 MEDIUM - Redundant cloning in tuple flattening operation (2 occurrences)Agent: performance Category: performance Why this matters: Poor performance degrades user experience. 📍 View all locations
Rule: Review ID: |
|
Hey, sorry about the late response! I just updated jit, so everything should be good (unless there are other crates I'm missing which I'm currently looking through). I'm unsure about how I should merge the conflicts. Am I good to just accept the incoming changes? |
|
(Wrote a comment on the wrong PR. This one should be fine to merge, once conflicts are resolved) |
|
@terryluan12 I think accepting new code, change std again to core is more easy in this case |
|
Sounds good. Just fixed the conflicts! |
Co-authored-by: Jeong, YunWon <[email protected]>
youknowone
left a comment
There was a problem hiding this comment.
@terryluan12 Thank you so much for working on this huge task!
Hey there, because it seemed fairly straightforward, I ended up just adding it; I hope that's alright! Please let me know if there is anything I should change.
This addresses issue #6380