Skip to content

Commit c4219a4

Browse files
committed
rustdoc: Highlight function names
Closes #9460
1 parent 5636ca6 commit c4219a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/librustdoc/html/render.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,8 @@ fn render_method(w: &mut io::Writer, meth: &clean::Item, withlink: bool) {
889889
g: &clean::Generics, selfty: &clean::SelfTy, d: &clean::FnDecl,
890890
withlink: bool) {
891891
write!(w, "{}fn {withlink, select,
892-
true{<a href='\\#fn.{name}'>{name}</a>}
893-
other{{name}}
892+
true{<a href='\\#fn.{name}' class='fnname'>{name}</a>}
893+
other{<span class='fnname'>{name}</span>}
894894
}{generics}{decl}",
895895
match purity {
896896
ast::unsafe_fn => "unsafe ",

src/librustdoc/html/static/main.css

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ a {
221221
.content a.enum, .block a.current.enum { color: #5e9766; }
222222
.content a.struct, .block a.current.struct { color: #e53700; }
223223
.content a.fn, .block a.current.fn { color: #8c6067; }
224+
.content .fnname { color: #8c6067; }
224225

225226
.search-input {
226227
border: 2px solid #f2f2f2;

0 commit comments

Comments
 (0)