Skip to content

Commit

Permalink
Remove needless is_not_nightly closure.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jul 31, 2022
1 parent 0264a36 commit 7858beb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/cargo-test-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@ pub fn cargo_test(attr: TokenStream, item: TokenStream) -> TokenStream {
let mut ignore = false;
let mut requires_reason = false;
let mut found_reason = false;
let is_not_nightly = || !version().1;
let is_not_nightly = !version().1;
for rule in split_rules(attr) {
match rule.as_str() {
"build_std_real" => {
// Only run the "real" build-std tests on nightly and with an
// explicit opt-in (these generally only work on linux, and
// have some extra requirements, and are slow, and can pollute
// the environment since it downloads dependencies).
ignore |= is_not_nightly();
ignore |= is_not_nightly;
ignore |= option_env!("CARGO_RUN_BUILD_STD_TESTS").is_none();
}
"build_std_mock" => {
// Only run the "mock" build-std tests on nightly and disable
// for windows-gnu which is missing object files (see
// https://github.com/rust-lang/wg-cargo-std-aware/issues/46).
ignore |= is_not_nightly();
ignore |= is_not_nightly;
ignore |= cfg!(all(target_os = "windows", target_env = "gnu"));
}
"nightly" => {
requires_reason = true;
ignore |= is_not_nightly();
ignore |= is_not_nightly;
}
s if s.starts_with("requires_") => {
let command = &s[9..];
Expand Down

0 comments on commit 7858beb

Please sign in to comment.