Mercurial > public > mercurial-scm > hg
comparison rust/hg-cpython/src/lib.rs @ 49932:136aa80aa8b2
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.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 09 Jan 2023 19:36:41 +0100 |
parents | 7b068abe4aa2 |
children | 4c5f6e95df84 |
comparison
equal
deleted
inserted
replaced
49931:fba29deebfe7 | 49932:136aa80aa8b2 |
---|---|
16 //! ```text | 16 //! ```text |
17 //! >>> from mercurial.rustext import ancestor | 17 //! >>> from mercurial.rustext import ancestor |
18 //! >>> ancestor.__doc__ | 18 //! >>> ancestor.__doc__ |
19 //! 'Generic DAG ancestor algorithms - Rust implementation' | 19 //! 'Generic DAG ancestor algorithms - Rust implementation' |
20 //! ``` | 20 //! ``` |
21 #![allow(clippy::too_many_arguments)] // rust-cpython macros | |
22 #![allow(clippy::zero_ptr)] // rust-cpython macros | |
23 #![allow(clippy::needless_update)] // rust-cpython macros | |
24 #![allow(clippy::manual_strip)] // rust-cpython macros | |
25 #![allow(clippy::type_complexity)] // rust-cpython macros | |
21 | 26 |
22 /// This crate uses nested private macros, `extern crate` is still needed in | 27 /// This crate uses nested private macros, `extern crate` is still needed in |
23 /// 2018 edition. | 28 /// 2018 edition. |
24 #[macro_use] | 29 #[macro_use] |
25 extern crate cpython; | 30 extern crate cpython; |