rustdoc: Use ty::ImplPolarity
instead of custom enum
This commit is contained in:
parent
543aea6c03
commit
120ef36307
8 changed files with 17 additions and 34 deletions
|
@ -14,6 +14,7 @@ use rustc_data_structures::captures::Captures;
|
|||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::def_id::CRATE_DEF_INDEX;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
@ -991,8 +992,8 @@ impl clean::Impl {
|
|||
|
||||
if let Some(ref ty) = self.trait_ {
|
||||
match self.polarity {
|
||||
clean::ImplPolarity::Positive => {}
|
||||
clean::ImplPolarity::Negative => write!(f, "!")?,
|
||||
ty::ImplPolarity::Positive | ty::ImplPolarity::Reservation => {}
|
||||
ty::ImplPolarity::Negative => write!(f, "!")?,
|
||||
}
|
||||
fmt::Display::fmt(&ty.print(cx), f)?;
|
||||
write!(f, " for ")?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue