diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index b97ccfd3c88..e432da3dcaf 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1653,8 +1653,8 @@ fn shorter<'a>(s: Option<&'a str>) -> String { #[inline] fn plain_summary_line(s: Option<&str>) -> String { - let line = shorter(s).replace("\n", " "); - markdown::plain_summary_line(&line[..]) + let md = markdown::plain_summary_line(s.unwrap_or("")); + shorter(Some(&md)).replace("\n", " ") } fn document(w: &mut fmt::Formatter, cx: &Context, item: &clean::Item) -> fmt::Result { @@ -1781,6 +1781,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context, } else { String::new() }; + let doc_value = myitem.doc_value().unwrap_or(""); try!(write!(w, " or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// @has issue_30366/index.html '//a/@href' 'http://www.rust-lang.org/' + +/// Describe it. [Link somewhere][1]. +/// +/// [1]: http://www.rust-lang.org/ +pub fn here_is_a_fn() { }