[Rust] Clarify MSRV and Clippy policy
While looking at the Rust crates, I noticed that their Rust-version declarations and Clippy coverage differ.
flatbuffers: rust-version = "1.51"
flexbuffers: no rust-version
flatbuffers-reflection: no rust-version, edition = "2021"
I also found the earlier MSRV discussion in #5812 and the Rust change-policy discussion in #6718, which appear to describe a policy of supporting roughly the two most recent stable Rust releases. I'm not sure how that policy relates to the current rust-version = "1.51" or other crates.
With Rust 1.98.1 and Clippy 0.1.98 I currently see:
flatbuffers: 14 Clippy warnings flexbuffers: 55 Clippy warnings reflection: 59 Clippy warnings rust-analyzer also reports 21 warnings in reflection
I also noticed that tests/RustTest.sh runs cargo clippy from tests/rust_usage_test. That crate has path dependencies on flatbuffers and flexbuffers, so this appears to provide Clippy coverage for those crates. However, the command does not use -D warnings, so the "No Cargo clippy lints test" step succeeds even when Clippy emits warnings.
reflection is not a dependency of rust_usage_test, so it does not appear to be covered by that Clippy run.
Could maintainers clarify the intended policy here?
- What is the current MSRV for the Rust crates, and should all three crates declare rust-version?
- Is handwritten Rust code expected to be warning/Clippy-clean?
- Is the existing "No Cargo clippy lints test" intended to enforce zero Clippy warnings?
I'd like to confirm the intended policy before making cleanup or CI changes.
Source: google/flatbuffers