]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: Remove dummy UnknownBound variant
authorTom Jakubowski <tom@crystae.net>
Mon, 6 Oct 2014 09:22:40 +0000 (02:22 -0700)
committerTom Jakubowski <tom@crystae.net>
Mon, 6 Oct 2014 09:30:22 +0000 (02:30 -0700)
src/librustdoc/clean/inline.rs
src/librustdoc/clean/mod.rs
src/librustdoc/html/format.rs

index 4bef672ea0df9a861db83d0fcbb00a04e621e455..4ef72361701f2bf4e2ab5294bc382fbbb671554d 100644 (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),
index 0b37a21cb0b8076590fe74ef3ab763df2e1e3582..0175c95d7cb1fd553046779baade83121fb34f89 100644 (file)
@@ -475,7 +475,6 @@ fn clean(&self, cx: &DocContext) -> TyParam {
 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())
index 9d77b621d4aa03ec4449e15b0a9e6a7adac33a6f..6f1feb6e1cd8631d074bf29877a5763590546687 100644 (file)
@@ -146,9 +146,6 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
             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 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
                            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(": ");