about summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/html/render.rs')
-rw-r--r--src/librustdoc/html/render.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index ebdd43b1775..ceb66be2d66 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -1680,9 +1680,6 @@ fn item_function(w: &mut fmt::Formatter, it: &clean::Item,
 fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
               t: &clean::Trait) -> fmt::Result {
     let mut bounds = String::new();
-    if let Some(ref ty) = t.default_unbound {
-        bounds.push_str(format!(" for {}?", ty).as_slice());
-    }
     if t.bounds.len() > 0 {
         if bounds.len() > 0 {
             bounds.push(' ');
@@ -1803,7 +1800,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
     try!(write!(w, r#"<script type="text/javascript" async
                               src="{root_path}/implementors/{path}/{ty}.{name}.js">
                       </script>"#,
-                root_path = Vec::from_elem(cx.current.len(), "..").connect("/"),
+                root_path = repeat("..").take(cx.current.len()).collect::<Vec<_>>().connect("/"),
                 path = if ast_util::is_local(it.def_id) {
                     cx.current.connect("/")
                 } else {
@@ -2059,7 +2056,8 @@ fn render_struct(w: &mut fmt::Formatter, it: &clean::Item,
 fn render_methods(w: &mut fmt::Formatter, it: &clean::Item) -> fmt::Result {
     match cache().impls.get(&it.def_id) {
         Some(v) => {
-            let (non_trait, traits) = v.partitioned(|i| i.impl_.trait_.is_none());
+            let (non_trait, traits): (Vec<_>, _) = v.iter().cloned()
+                .partition(|i| i.impl_.trait_.is_none());
             if non_trait.len() > 0 {
                 try!(write!(w, "<h2 id='methods'>Methods</h2>"));
                 for i in non_trait.iter() {
@@ -2069,7 +2067,8 @@ fn render_methods(w: &mut fmt::Formatter, it: &clean::Item) -> fmt::Result {
             if traits.len() > 0 {
                 try!(write!(w, "<h2 id='implementations'>Trait \
                                   Implementations</h2>"));
-                let (derived, manual) = traits.partition(|i| i.impl_.derived);
+                let (derived, manual): (Vec<_>, _) = traits.into_iter()
+                    .partition(|i| i.impl_.derived);
                 for i in manual.iter() {
                     try!(render_impl(w, i));
                 }