Skip to content

Commit

Permalink
misc: ignore some warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Yato202010 committed Dec 29, 2024
1 parent 73dcb0b commit c882c47
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/end2end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ macro_rules! skip {
};
($string:expr) => {
use colored::*;
unsafe { $crate::TEST_RUNNER.skip_filtered() };
#[allow(static_mut_refs)]
unsafe {
$crate::TEST_RUNNER.skip_filtered()
};
print!("{} ", ("filtered: ".to_string() + $string).yellow());
};
}
Expand All @@ -93,11 +96,13 @@ macro_rules! skip {
macro_rules! register_tests {
( $($fn_path:path$(,)?)* ) => {{
$(
#[allow(static_mut_refs)]
unsafe { $crate::TEST_RUNNER.register_test(stringify!($fn_path),$fn_path) }
)*
}};
}

#[allow(static_mut_refs)]
fn main() {
register_test();
let to_pass = unsafe { TEST_RUNNER.len() };
Expand Down

0 comments on commit c882c47

Please sign in to comment.