1
Fork 0

rustdoc: Remove dummy UnknownBound variant

This commit is contained in:
Tom Jakubowski 2014-10-06 02:22:40 -07:00
parent 7be20574e0
commit 3bd4475278
3 changed files with 4 additions and 10 deletions

View file

@ -325,8 +325,7 @@ fn build_impl(cx: &DocContext, tcx: &ty::ctxt,
match bound {
clean::TraitBound(ty) => ty,
clean::UnboxedFnBound(..) |
clean::RegionBound(..) |
clean::UnknownBound => unreachable!(),
clean::RegionBound(..) => unreachable!(),
}
}),
for_: ty.ty.clean(cx),

View file

@ -475,7 +475,6 @@ impl Clean<TyParam> for ty::TypeParameterDef {
pub enum TyParamBound {
RegionBound(Lifetime),
UnboxedFnBound(UnboxedFnType),
UnknownBound,
TraitBound(Type)
}
@ -521,7 +520,7 @@ impl Clean<TyParamBound> for ty::BuiltinBound {
fn clean(&self, cx: &DocContext) -> TyParamBound {
let tcx = match cx.tcx_opt() {
Some(tcx) => tcx,
None => return UnknownBound
None => return RegionBound(Lifetime::statik())
};
let empty = subst::Substs::empty();
let (did, path) = match *self {
@ -554,7 +553,7 @@ impl Clean<TyParamBound> for ty::TraitRef {
fn clean(&self, cx: &DocContext) -> TyParamBound {
let tcx = match cx.tcx_opt() {
Some(tcx) => tcx,
None => return UnknownBound
None => return RegionBound(Lifetime::statik())
};
let fqn = csearch::get_item_path(tcx, self.def_id);
let fqn = fqn.into_iter().map(|i| i.to_string())

View file

@ -146,9 +146,6 @@ impl fmt::Show for clean::TyParamBound {
clean::UnboxedFnBound(ref ty) => {
write!(f, "{}{}", ty.path, ty.decl)
}
clean::UnknownBound => {
write!(f, "'static")
}
clean::TraitBound(ref ty) => {
write!(f, "{}", *ty)
}
@ -408,8 +405,7 @@ impl fmt::Show for clean::Type {
for bound in decl.bounds.iter() {
match *bound {
clean::RegionBound(..) |
clean::UnboxedFnBound(..) |
clean::UnknownBound => {}
clean::UnboxedFnBound(..) => {}
clean::TraitBound(ref t) => {
if ret.len() == 0 {
ret.push_str(": ");