diff --git a/crates/cfg/src/dnf.rs b/crates/cfg/src/dnf.rs index 35f946e6fd..a08c307dac 100644 --- a/crates/cfg/src/dnf.rs +++ b/crates/cfg/src/dnf.rs @@ -458,6 +458,7 @@ mod test { &opts, expect![["test and test2 are enabled"]], ); + check_why_inactive("#![cfg(all(a, b))]", &opts, expect![["a and b are disabled"]]); check_why_inactive( "#![cfg(all(not(test), a))]", &opts, diff --git a/crates/cfg/src/lib.rs b/crates/cfg/src/lib.rs index 0b0734213f..28a40a0827 100644 --- a/crates/cfg/src/lib.rs +++ b/crates/cfg/src/lib.rs @@ -137,7 +137,7 @@ impl fmt::Display for InactiveReason { for (i, atom) in self.disabled.iter().enumerate() { let sep = match i { 0 => "", - _ if i == self.enabled.len() - 1 => " and ", + _ if i == self.disabled.len() - 1 => " and ", _ => ", ", }; f.write_str(sep)?;