1
Fork 0

Remove PrimitiveType::as_str

This commit is contained in:
Joshua Nelson 2021-04-22 22:04:50 -04:00
parent 132211bce5
commit 5079744414
4 changed files with 10 additions and 41 deletions

View file

@ -574,7 +574,7 @@ fn primitive_link(
f,
"<a class=\"primitive\" href=\"{}primitive.{}.html\">",
"../".repeat(len),
prim.as_str()
prim.as_sym()
)?;
needs_termination = true;
}
@ -603,7 +603,7 @@ fn primitive_link(
f,
"<a class=\"primitive\" href=\"{}/primitive.{}.html\">",
loc.join("/"),
prim.as_str()
prim.as_sym()
)?;
needs_termination = true;
}
@ -677,7 +677,7 @@ fn fmt_type<'cx>(
fmt::Display::fmt(&tybounds(param_names, cx), f)
}
clean::Infer => write!(f, "_"),
clean::Primitive(prim) => primitive_link(f, prim, prim.as_str(), cx),
clean::Primitive(prim) => primitive_link(f, prim, &*prim.as_sym().as_str(), cx),
clean::BareFunction(ref decl) => {
if f.alternate() {
write!(