(&mut self,
out: &mut W)
-> io::Result<()> {
loop {
@@ -208,7 +199,7 @@ impl<'a> Classifier<'a> {
-> io::Result<()> {
let klass = match tas.tok {
token::Shebang(s) => {
- out.string(Escape(&s.as_str()), Class::None, Some(&tas))?;
+ out.string(Escape(&s.as_str()), Class::None)?;
return Ok(());
},
@@ -272,8 +263,8 @@ impl<'a> Classifier<'a> {
self.in_attribute = true;
out.enter_span(Class::Attribute)?;
}
- out.string("#", Class::None, None)?;
- out.string("!", Class::None, None)?;
+ out.string("#", Class::None)?;
+ out.string("!", Class::None)?;
return Ok(());
}
@@ -282,13 +273,13 @@ impl<'a> Classifier<'a> {
self.in_attribute = true;
out.enter_span(Class::Attribute)?;
}
- out.string("#", Class::None, None)?;
+ out.string("#", Class::None)?;
return Ok(());
}
token::CloseDelim(token::Bracket) => {
if self.in_attribute {
self.in_attribute = false;
- out.string("]", Class::None, None)?;
+ out.string("]", Class::None)?;
out.exit_span()?;
return Ok(());
} else {
@@ -344,7 +335,7 @@ impl<'a> Classifier<'a> {
// Anything that didn't return above is the simple case where we the
// class just spans a single token, so we can use the `string` method.
- out.string(Escape(&self.snip(tas.sp)), klass, Some(&tas))
+ out.string(Escape(&self.snip(tas.sp)), klass)
}
// Helper function to get a snippet from the codemap.
@@ -355,7 +346,7 @@ impl<'a> Classifier<'a> {
impl Class {
/// Returns the css class expected by rustdoc for each `Class`.
- pub fn rustdoc_class(self) -> &'static str {
+ fn rustdoc_class(self) -> &'static str {
match self {
Class::None => "",
Class::Comment => "comment",
@@ -379,15 +370,8 @@ impl Class {
}
}
-fn write_header(class: Option<&str>,
- id: Option<&str>,
- out: &mut dyn Write)
- -> io::Result<()> {
- write!(out, "\n", class.unwrap_or(""))
+fn write_header(class: Option<&str>, out: &mut Write) -> io::Result<()> {
+ write!(out, "\n", class.unwrap_or(""))
}
fn write_footer(out: &mut dyn Write) -> io::Result<()> {
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index 706671f21eff..b22e239e20a0 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -247,7 +247,6 @@ impl<'a, I: Iterator- >> Iterator for CodeBlocks<'a, I> {
if ignore { " ignore" }
else if compile_fail { " compile_fail" }
else { "" })),
- None,
playground_button.as_ref().map(String::as_str),
tooltip));
Some(Event::Html(s.into()))
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index c1375fd37fd6..c2978a62489a 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -2239,7 +2239,6 @@ fn render_assoc_const_value(item: &clean::Item) -> String {
None,
None,
None,
- None,
)
}
_ => String::new(),
@@ -4551,7 +4550,7 @@ impl<'a> fmt::Display for Source<'a> {
}
write!(fmt, "
")?;
write!(fmt, "{}",
- highlight::render_with_highlighting(s, None, None, None, None))?;
+ highlight::render_with_highlighting(s, None, None, None))?;
Ok(())
}
}
@@ -4562,7 +4561,6 @@ fn item_macro(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
w.write_str(&highlight::render_with_highlighting(&t.source,
Some("macro"),
None,
- None,
None))
})?;
document(w, cx, it)