lucifer1004 opened a new pull request, #826:
URL: https://github.com/apache/tvm-ffi/pull/826

   ## Why
   
   `cargo clippy -p tvm-ffi-macros --all-targets -- -D warnings` fails on 
`main` with four warnings, all in `tvm-ffi-macros`. CI runs only `cargo test` 
for the Rust crates, so they go unnoticed, but they fail anyone who lints the 
crate. This follows #496, which fixed deny-level lints in the same crates.
   
   ## What
   
   - `lib.rs` (`useless_conversion`, 2 warnings): `derive_object` and 
`derive_object_ref` wrapped values that already are `proc_macro::TokenStream` 
in `TokenStream::from`; the wrapper is removed.
   - `object_macros.rs` (`bind_instead_of_map`): `Option::and_then(|f| 
Some(quote! { .. }))` becomes `Option::map(|f| quote! { .. })`.
   - `match_any.rs` (`too_many_arguments`): `expand_direct_leaf_selection` 
takes nine arguments, six of which are the hygienic identifiers that the 
generated code shares with its caller. Grouping them in a struct would mean 
changing the neighbouring expanders too, so the lint is allowed on this 
function, as the crate already does elsewhere 
(`#[allow(clippy::wrong_self_convention)]` in `tensor.rs`).
   
   Generated code is unchanged.
   
   ## Scope
   
   - This covers only `tvm-ffi-macros`. `tvm-ffi` has about 70 clippy warnings 
under default lints; many of them, such as missing `# Safety` sections or 
`Default` implementations, need decisions on public items, so they are left for 
separate changes.
   - `rustfmt` also reports differences on `main` in 
`tvm-ffi-macros/src/dispatch.rs` and `tvm-ffi/tests/test_structural_visit.rs`. 
They are not touched here.
   
   ## Tests
   
   - `cargo clippy -p tvm-ffi-macros --all-targets --no-deps -- -D warnings`: 
clean. On `main` it reports the four warnings above.
   - `cargo test` in `rust/`: passes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to