rust-clippy: disable some lints crate-wide for `hg-cpython`
authorRaphaël Gomès <rgomes@octobus.net>
Mon, 09 Jan 2023 19:36:41 +0100
changeset 49932 136aa80aa8b2
parent 49931 fba29deebfe7
child 49933 be3b545c5cff
rust-clippy: disable some lints crate-wide for `hg-cpython` `rust-cpython` creates some pretty funky code that also needs to be compatible with pretty old Rust. This makes clippy quite useless in `hg-cpython` unless you disable the lints that are always triggered by `py_class!` and related. Maybe `clippy` will allow one day to exclude a dependency from its linting, but this seems quite unlikely, so this is the best we've got at the moment.
rust/hg-cpython/src/lib.rs
--- a/rust/hg-cpython/src/lib.rs	Mon Jan 09 19:32:35 2023 +0100
+++ b/rust/hg-cpython/src/lib.rs	Mon Jan 09 19:36:41 2023 +0100
@@ -18,6 +18,11 @@
 //! >>> ancestor.__doc__
 //! 'Generic DAG ancestor algorithms - Rust implementation'
 //! ```
+#![allow(clippy::too_many_arguments)] // rust-cpython macros
+#![allow(clippy::zero_ptr)] // rust-cpython macros
+#![allow(clippy::needless_update)] // rust-cpython macros
+#![allow(clippy::manual_strip)] // rust-cpython macros
+#![allow(clippy::type_complexity)] // rust-cpython macros
 
 /// This crate uses nested private macros, `extern crate` is still needed in
 /// 2018 edition.