Skip to content

Commit a801a42

Browse files
committed
fix mutability of method_context variable
1 parent 8e77c5a commit a801a42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/html/render.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,7 @@ fn render_methods(w: &mut fmt::Formatter, it: &clean::Item) -> fmt::Result {
20832083
}
20842084

20852085
fn render_impl(w: &mut fmt::Formatter, i: &Impl) -> fmt::Result {
2086-
let method_context: &str = "";
2086+
let mut method_context: &str = "";
20872087

20882088
try!(write!(w, "<h3 class='impl'>{}<code>impl{} ",
20892089
ConciseStability(&i.stability),
@@ -2093,6 +2093,7 @@ fn render_impl(w: &mut fmt::Formatter, i: &Impl) -> fmt::Result {
20932093
try!(write!(w, "{} for ", *ty))},
20942094
None => {}
20952095
}
2096+
method_context = format!("{}:{}", i.impl_.for_, method_context).as_slice();
20962097
try!(write!(w, "{}{}</code></h3>", i.impl_.for_, WhereClause(&i.impl_.generics)));
20972098
match i.dox {
20982099
Some(ref dox) => {

0 commit comments

Comments
 (0)