1
Fork 0

Use an enum to record polarity in clean::Impl

This commit is contained in:
Noah Lev 2021-11-07 08:52:28 -08:00
parent 7b7023cb72
commit 543aea6c03
8 changed files with 34 additions and 23 deletions

View file

@ -990,8 +990,9 @@ impl clean::Impl {
}
if let Some(ref ty) = self.trait_ {
if self.negative_polarity {
write!(f, "!")?;
match self.polarity {
clean::ImplPolarity::Positive => {}
clean::ImplPolarity::Negative => write!(f, "!")?,
}
fmt::Display::fmt(&ty.print(cx), f)?;
write!(f, " for ")?;