Remove the unboxed closure |:| notation from types and trait references completely.

This commit is contained in:
Niko Matsakis 2014-11-04 16:25:15 -05:00
parent 221edbae38
commit d0fa4c6239
17 changed files with 29 additions and 348 deletions

View file

@ -323,7 +323,6 @@ fn build_impl(cx: &DocContext, tcx: &ty::ctxt,
trait_: associated_trait.clean(cx).map(|bound| {
match bound {
clean::TraitBound(ty) => ty,
clean::UnboxedFnBound(..) |
clean::RegionBound(..) => unreachable!(),
}
}),

View file

@ -476,7 +476,6 @@ impl Clean<TyParam> for ty::TypeParameterDef {
#[deriving(Clone, Encodable, Decodable, PartialEq)]
pub enum TyParamBound {
RegionBound(Lifetime),
UnboxedFnBound(UnboxedFnType),
TraitBound(Type)
}
@ -484,7 +483,6 @@ impl Clean<TyParamBound> for ast::TyParamBound {
fn clean(&self, cx: &DocContext) -> TyParamBound {
match *self {
ast::RegionTyParamBound(lt) => RegionBound(lt.clean(cx)),
ast::UnboxedFnTyParamBound(ref ty) => { UnboxedFnBound(ty.clean(cx)) },
ast::TraitTyParamBound(ref t) => TraitBound(t.clean(cx)),
}
}
@ -599,21 +597,6 @@ impl Clean<Option<Vec<TyParamBound>>> for subst::Substs {
}
}
#[deriving(Clone, Encodable, Decodable, PartialEq)]
pub struct UnboxedFnType {
pub path: Path,
pub decl: FnDecl
}
impl Clean<UnboxedFnType> for ast::UnboxedFnBound {
fn clean(&self, cx: &DocContext) -> UnboxedFnType {
UnboxedFnType {
path: self.path.clean(cx),
decl: self.decl.clean(cx)
}
}
}
#[deriving(Clone, Encodable, Decodable, PartialEq)]
pub struct Lifetime(String);

View file

@ -143,9 +143,6 @@ impl fmt::Show for clean::TyParamBound {
clean::RegionBound(ref lt) => {
write!(f, "{}", *lt)
}
clean::UnboxedFnBound(ref ty) => {
write!(f, "{}{}", ty.path, ty.decl)
}
clean::TraitBound(ref ty) => {
write!(f, "{}", *ty)
}
@ -404,8 +401,7 @@ impl fmt::Show for clean::Type {
let mut ret = String::new();
for bound in decl.bounds.iter() {
match *bound {
clean::RegionBound(..) |
clean::UnboxedFnBound(..) => {}
clean::RegionBound(..) => {}
clean::TraitBound(ref t) => {
if ret.len() == 0 {
ret.push_str(": ");