rust-lang / rustc_codegen_gcc

libgccjit AOT codegen for rustc
Apache License 2.0
913 stars 60 forks source link

Clippy related fixes #469

Closed tempdragon closed 6 months ago

tempdragon commented 6 months ago
  1. I don't know if you are interested in merging this half-generated(if not fully) commit. If not, feel free to close it. Everything is generated if not mentioned.
  2. I do apologize for a likely delay in answering the reviews.
  3. I renamed the methods from_low_high_rvalues and from_low_high in tempdragon/rustc_codegen_gcc@a7d39b852a5ad19b11781c18b59d38dc6ef92932
  4. All life time related modifications were done by using cargo clippy --fix --lib -p rustc_codegen_gcc --allow-dirtyxs, as is done in tempdragon/rustc_codegen_gcc@ad97b8c061e6f39a52daaf036c9721e17510c30c. However, since I am not an expert in lifetime, I can't guarantee its correctness(But it passed the workflow anyway.)
  5. In tempdragon/rustc_codegen_gcc@d2cda90e4ecb32cbf7be08d166daa78b5dbed819, the shift was removed for use of i, but the shift variable still looks weird here.
  6. I used a clone() to solve pattern_type_mismatch lint in tempdragon/rustc_codegen_gcc@8d4d87859b6ec9d5aae2b0297514b27d413c19d2, but it looks less efficient. I should apologize because I do doubt if there is a better way to fix this here.

Probably gonna solve #457.

antoyo commented 6 months ago

Also, if you want, please add cargo clippy --all-targets -- -D warnings somewhere in one CI workflow.

tempdragon commented 6 months ago

Also, if you want, please add cargo clippy --all-targets -- -D warnings somewhere in one CI workflow.

Added in 4e4efb9

tempdragon commented 6 months ago

Look good to me. Thanks for your review!

antoyo commented 6 months ago

Thanks for your contribution!