From 414a7508c69e0e439fdb35906a013463c4200ec7 Mon Sep 17 00:00:00 2001 From: Vincent Thiberville Date: Wed, 27 Sep 2023 01:07:26 +0200 Subject: [PATCH] ci: fix coverage computation nightly has updated the coverage feature to coverage_attribute. See https://github.com/rust-lang/rust/pull/114656 --- boreal/src/compiler/module.rs | 2 +- boreal/src/lib.rs | 2 +- boreal/src/module/mod.rs | 2 +- boreal/src/module/pe/ord.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/boreal/src/compiler/module.rs b/boreal/src/compiler/module.rs index 359ff1d9..c02cd278 100644 --- a/boreal/src/compiler/module.rs +++ b/boreal/src/compiler/module.rs @@ -602,7 +602,7 @@ mod tests { use super::*; use crate::test_helpers::test_type_traits_non_clonable; - #[cfg_attr(coverage_nightly, no_coverage)] + #[cfg_attr(coverage_nightly, coverage(off))] fn test_fun(_ctx: &ScanContext, args: Vec) -> Option { drop(args); None diff --git a/boreal/src/lib.rs b/boreal/src/lib.rs index 543ee4bc..c4259469 100644 --- a/boreal/src/lib.rs +++ b/boreal/src/lib.rs @@ -69,7 +69,7 @@ #![deny(clippy::cargo)] // Handled by cargo-deny #![allow(clippy::multiple_crate_versions)] -#![cfg_attr(coverage_nightly, feature(no_coverage))] +#![cfg_attr(coverage_nightly, feature(coverage_attribute))] // Used in integration tests, not in the library. // This is to remove the "unused_crate_dependencies" warning, maybe a better solution diff --git a/boreal/src/module/mod.rs b/boreal/src/module/mod.rs index 674b86b9..46e99684 100644 --- a/boreal/src/module/mod.rs +++ b/boreal/src/module/mod.rs @@ -659,7 +659,7 @@ mod tests { use super::*; use crate::test_helpers::{test_type_traits, test_type_traits_non_clonable}; - #[cfg_attr(coverage_nightly, no_coverage)] + #[cfg_attr(coverage_nightly, coverage(off))] fn test_fun(_ctx: &ScanContext, args: Vec) -> Option { drop(args); None diff --git a/boreal/src/module/pe/ord.rs b/boreal/src/module/pe/ord.rs index 983204e6..f9c52fdb 100644 --- a/boreal/src/module/pe/ord.rs +++ b/boreal/src/module/pe/ord.rs @@ -19,7 +19,7 @@ pub(super) fn ord_lookup(dll_name: &[u8], ord: u16) -> Vec { format!("ord{ord}").into_bytes() } -#[cfg_attr(coverage_nightly, no_coverage)] +#[cfg_attr(coverage_nightly, coverage(off))] fn wsock32_ord_lookup(ord: u16) -> Option<&'static [u8]> { match ord { 1 => Some(b"accept"), @@ -143,7 +143,7 @@ fn wsock32_ord_lookup(ord: u16) -> Option<&'static [u8]> { } } -#[cfg_attr(coverage_nightly, no_coverage)] +#[cfg_attr(coverage_nightly, coverage(off))] fn oleaut32_ord_lookup(ord: u16) -> Option<&'static [u8]> { match ord { 2 => Some(b"SysAllocString"),