diff options
| author | Tom Jakubowski <tom@crystae.net> | 2014-10-06 02:22:40 -0700 |
|---|---|---|
| committer | Tom Jakubowski <tom@crystae.net> | 2014-10-06 02:30:22 -0700 |
| commit | 3bd44752788b7f27b8fbe4a9f436d65ff9dd9de2 (patch) | |
| tree | 058c4fdbcbfad389dd45e421d70e41dae4537bb3 /src/librustdoc | |
| parent | 7be20574e06fdbaffcc6f56b9ee562ce9f81f9b9 (diff) | |
| download | rust-3bd44752788b7f27b8fbe4a9f436d65ff9dd9de2.tar.gz rust-3bd44752788b7f27b8fbe4a9f436d65ff9dd9de2.zip | |
rustdoc: Remove dummy UnknownBound variant
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/clean/inline.rs | 3 | ||||
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 5 | ||||
| -rw-r--r-- | src/librustdoc/html/format.rs | 6 |
3 files changed, 4 insertions, 10 deletions
diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index 4bef672ea0d..4ef72361701 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -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), diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 0b37a21cb0b..0175c95d7cb 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -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()) diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 9d77b621d4a..6f1feb6e1cd 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -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(": "); |
