diff --git a/.clippy.toml b/.clippy.toml index bd8bd641..d842e407 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,6 +1,7 @@ # Clippy configuration # https://doc.rust-lang.org/nightly/clippy/lint_configuration.html +allow-private-module-inception = true avoid-breaking-exported-api = false disallowed-names = [] disallowed-macros = [ diff --git a/Cargo.toml b/Cargo.toml index cb21a9c2..41c4bd97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -113,13 +113,13 @@ non_ascii_idents = "warn" rust_2018_idioms = "warn" single_use_lifetimes = "warn" unexpected_cfgs = { level = "warn", check-cfg = [ - "cfg(target_arch,values(\"xtensa\"))", - "cfg(target_pointer_width,values(\"128\"))", + 'cfg(target_arch,values("xtensa"))', + 'cfg(target_pointer_width,values("128"))', # Known custom cfgs, excluding those that may be set by build script. # Not public API. - "cfg(portable_atomic_test_outline_atomics_detect_false,qemu,valgrind)", + 'cfg(portable_atomic_test_outline_atomics_detect_false,qemu,valgrind)', # Public APIs, considered unstable unless documented in readme. - "cfg(portable_atomic_no_outline_atomics,portable_atomic_outline_atomics)", + 'cfg(portable_atomic_no_outline_atomics,portable_atomic_outline_atomics)', ] } unreachable_pub = "warn" # unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV @@ -140,12 +140,13 @@ declare_interior_mutable_const = { level = "allow", priority = 1 } # https://git doc_markdown = { level = "allow", priority = 1 } float_cmp = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725 incompatible_msrv = { level = "allow", priority = 1 } # buggy: doesn't consider cfg, https://github.com/rust-lang/rust-clippy/issues/12280, https://github.com/rust-lang/rust-clippy/issues/12257#issuecomment-2093667187 -lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270 +lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920 manual_assert = { level = "allow", priority = 1 } manual_range_contains = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/6455#issuecomment-1225966395 missing_errors_doc = { level = "allow", priority = 1 } -module_name_repetitions = { level = "allow", priority = 1 } +module_name_repetitions = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+module_name_repetitions nonminimal_bool = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+nonminimal_bool +range_plus_one = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+range_plus_one similar_names = { level = "allow", priority = 1 } single_match = { level = "allow", priority = 1 } single_match_else = { level = "allow", priority = 1 } diff --git a/tests/avr/Cargo.toml b/tests/avr/Cargo.toml index a38af1cc..7a62f53e 100644 --- a/tests/avr/Cargo.toml +++ b/tests/avr/Cargo.toml @@ -22,12 +22,12 @@ resolver = "2" rust_2018_idioms = "warn" single_use_lifetimes = "warn" unexpected_cfgs = { level = "warn", check-cfg = [ - "cfg(target_arch,values(\"xtensa\"))", - "cfg(qemu)", + 'cfg(target_arch,values("xtensa"))', + 'cfg(qemu)', ] } # unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV [lints.clippy] -lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270 +lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920 [profile.dev] lto = true diff --git a/tests/gba/Cargo.toml b/tests/gba/Cargo.toml index 26ced71f..4345d502 100644 --- a/tests/gba/Cargo.toml +++ b/tests/gba/Cargo.toml @@ -18,11 +18,11 @@ resolver = "2" rust_2018_idioms = "warn" single_use_lifetimes = "warn" unexpected_cfgs = { level = "warn", check-cfg = [ - "cfg(target_arch,values(\"xtensa\"))", + 'cfg(target_arch,values("xtensa"))', ] } # unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV [lints.clippy] -lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270 +lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920 [profile.dev] # TODO: "GBA: Illegal opcode: e7ffdefe" on opt-level=0, GBA hang on opt-level={1,s,z} diff --git a/tests/no-std-qemu/Cargo.toml b/tests/no-std-qemu/Cargo.toml index f472bf1e..5873742d 100644 --- a/tests/no-std-qemu/Cargo.toml +++ b/tests/no-std-qemu/Cargo.toml @@ -35,11 +35,11 @@ resolver = "2" rust_2018_idioms = "warn" single_use_lifetimes = "warn" unexpected_cfgs = { level = "warn", check-cfg = [ - "cfg(target_arch,values(\"xtensa\"))", + 'cfg(target_arch,values("xtensa"))', ] } # unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV [lints.clippy] -lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270 +lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920 single_match = { level = "allow", priority = 1 } [profile.dev] diff --git a/tests/xtensa/Cargo.toml b/tests/xtensa/Cargo.toml index 3387a94a..c4c0df7e 100644 --- a/tests/xtensa/Cargo.toml +++ b/tests/xtensa/Cargo.toml @@ -23,11 +23,11 @@ resolver = "2" rust_2018_idioms = "warn" single_use_lifetimes = "warn" unexpected_cfgs = { level = "warn", check-cfg = [ - "cfg(target_arch,values(\"xtensa\"))", + 'cfg(target_arch,values("xtensa"))', ] } # unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV [lints.clippy] -lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270 +lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920 [profile.dev] opt-level = 'z'