match bound {
clean::TraitBound(ty) => ty,
clean::UnboxedFnBound(..) |
- clean::RegionBound(..) |
- clean::UnknownBound => unreachable!(),
+ clean::RegionBound(..) => unreachable!(),
}
}),
for_: ty.ty.clean(cx),
pub enum TyParamBound {
RegionBound(Lifetime),
UnboxedFnBound(UnboxedFnType),
- UnknownBound,
TraitBound(Type)
}
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 {
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())
clean::UnboxedFnBound(ref ty) => {
write!(f, "{}{}", ty.path, ty.decl)
}
- clean::UnknownBound => {
- write!(f, "'static")
- }
clean::TraitBound(ref ty) => {
write!(f, "{}", *ty)
}
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(": ");