This commit is contained in:
Jonas Schievink 2020-10-22 19:19:05 +02:00
parent 68b17986c7
commit 978cc93649
2 changed files with 2 additions and 1 deletions

View file

@ -458,6 +458,7 @@ mod test {
&opts, &opts,
expect![["test and test2 are enabled"]], expect![["test and test2 are enabled"]],
); );
check_why_inactive("#![cfg(all(a, b))]", &opts, expect![["a and b are disabled"]]);
check_why_inactive( check_why_inactive(
"#![cfg(all(not(test), a))]", "#![cfg(all(not(test), a))]",
&opts, &opts,

View file

@ -137,7 +137,7 @@ impl fmt::Display for InactiveReason {
for (i, atom) in self.disabled.iter().enumerate() { for (i, atom) in self.disabled.iter().enumerate() {
let sep = match i { let sep = match i {
0 => "", 0 => "",
_ if i == self.enabled.len() - 1 => " and ", _ if i == self.disabled.len() - 1 => " and ",
_ => ", ", _ => ", ",
}; };
f.write_str(sep)?; f.write_str(sep)?;