Skip to content

Commit

Permalink
ci: fix coverage computation
Browse files Browse the repository at this point in the history
nightly has updated the coverage feature to coverage_attribute.
See rust-lang/rust#114656
  • Loading branch information
vthib committed Sep 27, 2023
1 parent afa4189 commit 414a750
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion boreal/src/compiler/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Value>) -> Option<Value> {
drop(args);
None
Expand Down
2 changes: 1 addition & 1 deletion boreal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion boreal/src/module/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Value>) -> Option<Value> {
drop(args);
None
Expand Down
4 changes: 2 additions & 2 deletions boreal/src/module/pe/ord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub(super) fn ord_lookup(dll_name: &[u8], ord: u16) -> Vec<u8> {
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"),
Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit 414a750

Please sign in to comment.