Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(code): Remove coverage_attribute as it is now stable on Rust 1.85-nightly #693

Merged
merged 3 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 0 additions & 4 deletions code/crates/config/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 0 additions & 3 deletions code/crates/core-driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions code/crates/core-state-machine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions code/crates/core-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions code/crates/core-votekeeper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 0 additions & 4 deletions code/crates/discovery/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
4 changes: 0 additions & 4 deletions code/crates/engine/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 0 additions & 4 deletions code/crates/network/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 0 additions & 4 deletions code/crates/proto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 0 additions & 3 deletions code/crates/signing-ed25519/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 0 additions & 4 deletions code/crates/starknet/host/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 0 additions & 4 deletions code/crates/starknet/p2p-types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// For coverage on nightly
#![allow(unexpected_cfgs)]
#![cfg_attr(coverage_nightly, feature(coverage_attribute))]

mod context;
pub use context::MockContext;

Expand Down
4 changes: 2 additions & 2 deletions code/crates/test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ signature = { workspace = true }
[build-dependencies]
prost-build = { workspace = true }

# [lints]
# workspace = true
[lints]
workspace = true
4 changes: 0 additions & 4 deletions code/crates/test/mempool/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 0 additions & 3 deletions code/crates/test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading