diff --git a/code/Cargo.toml b/code/Cargo.toml index 95cc5030c..d2c65f9c6 100644 --- a/code/Cargo.toml +++ b/code/Cargo.toml @@ -59,7 +59,7 @@ inherits = "release" debug = true [workspace.lints.rust] -# None for now +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] } [workspace.dependencies] malachite-engine = { version = "0.1.0", path = "crates/engine" } diff --git a/code/crates/config/src/lib.rs b/code/crates/config/src/lib.rs index 4503b902e..0470ec269 100644 --- a/code/crates/config/src/lib.rs +++ b/code/crates/config/src/lib.rs @@ -1,7 +1,3 @@ -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] - use core::fmt; use std::net::{IpAddr, SocketAddr}; use std::path::Path; diff --git a/code/crates/core-driver/src/lib.rs b/code/crates/core-driver/src/lib.rs index db1be32ef..6d0ec67c3 100644 --- a/code/crates/core-driver/src/lib.rs +++ b/code/crates/core-driver/src/lib.rs @@ -10,10 +10,7 @@ )] // no_std compatibility #![cfg_attr(not(feature = "std"), no_std)] -// For coverage on nightly -#![allow(unexpected_cfgs)] #![cfg_attr(not(test), deny(clippy::unwrap_used, clippy::panic))] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] extern crate alloc; diff --git a/code/crates/core-state-machine/src/lib.rs b/code/crates/core-state-machine/src/lib.rs index 6d4352eb8..9e7573483 100644 --- a/code/crates/core-state-machine/src/lib.rs +++ b/code/crates/core-state-machine/src/lib.rs @@ -10,10 +10,7 @@ )] // no_std compatibility #![cfg_attr(not(feature = "std"), no_std)] -// For coverage on nightly -#![allow(unexpected_cfgs)] #![cfg_attr(not(test), deny(clippy::unwrap_used, clippy::panic))] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] extern crate alloc; diff --git a/code/crates/core-types/src/lib.rs b/code/crates/core-types/src/lib.rs index d54bfb9c7..1be73b7bd 100644 --- a/code/crates/core-types/src/lib.rs +++ b/code/crates/core-types/src/lib.rs @@ -9,10 +9,7 @@ rustdoc::private_intra_doc_links, variant_size_differences )] -// For coverage on nightly -#![allow(unexpected_cfgs)] #![cfg_attr(not(test), deny(clippy::unwrap_used, clippy::panic))] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] extern crate alloc; diff --git a/code/crates/core-votekeeper/src/lib.rs b/code/crates/core-votekeeper/src/lib.rs index cc8d45873..ba15bcac8 100644 --- a/code/crates/core-votekeeper/src/lib.rs +++ b/code/crates/core-votekeeper/src/lib.rs @@ -9,10 +9,7 @@ rustdoc::private_intra_doc_links, variant_size_differences )] -// For coverage on nightly -#![allow(unexpected_cfgs)] #![cfg_attr(not(test), deny(clippy::unwrap_used, clippy::panic))] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] extern crate alloc; diff --git a/code/crates/discovery/src/lib.rs b/code/crates/discovery/src/lib.rs index c3d86ec78..f2bd72448 100644 --- a/code/crates/discovery/src/lib.rs +++ b/code/crates/discovery/src/lib.rs @@ -1,7 +1,3 @@ -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] - use std::collections::HashMap; use tracing::{debug, error, info, warn}; diff --git a/code/crates/engine/src/lib.rs b/code/crates/engine/src/lib.rs index c10544aba..5d0384ddb 100644 --- a/code/crates/engine/src/lib.rs +++ b/code/crates/engine/src/lib.rs @@ -1,7 +1,3 @@ -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] - pub mod consensus; pub mod host; pub mod network; diff --git a/code/crates/network/src/lib.rs b/code/crates/network/src/lib.rs index ccad7a4e9..df561d23c 100644 --- a/code/crates/network/src/lib.rs +++ b/code/crates/network/src/lib.rs @@ -1,7 +1,3 @@ -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] - use std::collections::HashMap; use std::error::Error; use std::ops::ControlFlow; diff --git a/code/crates/proto/src/lib.rs b/code/crates/proto/src/lib.rs index 82ed90d41..6f1a1bf5c 100644 --- a/code/crates/proto/src/lib.rs +++ b/code/crates/proto/src/lib.rs @@ -1,7 +1,3 @@ -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] - use std::convert::Infallible; use prost::bytes::Bytes; diff --git a/code/crates/signing-ed25519/src/lib.rs b/code/crates/signing-ed25519/src/lib.rs index a8e73b06c..20c09743b 100644 --- a/code/crates/signing-ed25519/src/lib.rs +++ b/code/crates/signing-ed25519/src/lib.rs @@ -1,8 +1,5 @@ // no_std compatibility #![cfg_attr(not(feature = "std"), no_std)] -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] extern crate alloc; diff --git a/code/crates/starknet/host/src/lib.rs b/code/crates/starknet/host/src/lib.rs index ec399d2df..dbb746b95 100644 --- a/code/crates/starknet/host/src/lib.rs +++ b/code/crates/starknet/host/src/lib.rs @@ -1,7 +1,3 @@ -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] - pub mod actor; pub mod block_store; pub mod codec; diff --git a/code/crates/starknet/p2p-types/src/lib.rs b/code/crates/starknet/p2p-types/src/lib.rs index 819066d28..a4f9beecf 100644 --- a/code/crates/starknet/p2p-types/src/lib.rs +++ b/code/crates/starknet/p2p-types/src/lib.rs @@ -1,7 +1,3 @@ -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] - mod context; pub use context::MockContext; diff --git a/code/crates/test/Cargo.toml b/code/crates/test/Cargo.toml index 05f12413b..4f245feb8 100644 --- a/code/crates/test/Cargo.toml +++ b/code/crates/test/Cargo.toml @@ -37,5 +37,5 @@ signature = { workspace = true } [build-dependencies] prost-build = { workspace = true } -# [lints] -# workspace = true +[lints] +workspace = true diff --git a/code/crates/test/mempool/src/lib.rs b/code/crates/test/mempool/src/lib.rs index d50795eeb..350f23eb9 100644 --- a/code/crates/test/mempool/src/lib.rs +++ b/code/crates/test/mempool/src/lib.rs @@ -1,7 +1,3 @@ -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] - use core::fmt; use std::collections::HashMap; use std::error::Error; diff --git a/code/crates/test/src/lib.rs b/code/crates/test/src/lib.rs index 6c6e34524..185403b21 100644 --- a/code/crates/test/src/lib.rs +++ b/code/crates/test/src/lib.rs @@ -1,8 +1,5 @@ #![forbid(unsafe_code)] #![deny(trivial_casts, trivial_numeric_casts)] -// For coverage on nightly -#![allow(unexpected_cfgs)] -#![cfg_attr(coverage_nightly, feature(coverage_attribute))] mod address; mod context;