Skip to content

Commit 588f833

Browse files
author
Ariel Ben-Yehuda
authored
Rollup merge of rust-lang#44135 - GuillaumeGomez:fix-css-links, r=QuietMisdreavus
Fix invalid linker position Fixes rust-lang#44120. Result isn't "optimal" though because there are spaces at the end of some lines.
2 parents d59aa7d + f50bf86 commit 588f833

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/librustdoc/html/format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl<'a> fmt::Display for WhereClause<'a> {
228228
}
229229

230230
if end_newline {
231-
//add a space so stripping <br> tags and breaking spaces still renders properly
231+
// add a space so stripping <br> tags and breaking spaces still renders properly
232232
if f.alternate() {
233233
clause.push(' ');
234234
} else {

src/librustdoc/html/render.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1523,17 +1523,15 @@ impl<'a> fmt::Display for Item<'a> {
15231523
} else {
15241524
write!(fmt, "Module ")?;
15251525
},
1526-
clean::FunctionItem(..) | clean::ForeignFunctionItem(..) =>
1527-
write!(fmt, "Function ")?,
1526+
clean::FunctionItem(..) | clean::ForeignFunctionItem(..) => write!(fmt, "Function ")?,
15281527
clean::TraitItem(..) => write!(fmt, "Trait ")?,
15291528
clean::StructItem(..) => write!(fmt, "Struct ")?,
15301529
clean::UnionItem(..) => write!(fmt, "Union ")?,
15311530
clean::EnumItem(..) => write!(fmt, "Enum ")?,
15321531
clean::TypedefItem(..) => write!(fmt, "Type Definition ")?,
15331532
clean::MacroItem(..) => write!(fmt, "Macro ")?,
15341533
clean::PrimitiveItem(..) => write!(fmt, "Primitive Type ")?,
1535-
clean::StaticItem(..) | clean::ForeignStaticItem(..) =>
1536-
write!(fmt, "Static ")?,
1534+
clean::StaticItem(..) | clean::ForeignStaticItem(..) => write!(fmt, "Static ")?,
15371535
clean::ConstantItem(..) => write!(fmt, "Constant ")?,
15381536
_ => {
15391537
// We don't generate pages for any other type.

src/librustdoc/html/static/rustdoc.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,10 @@ h4 > code, h3 > code, .invisible > code {
329329
display: inline-block;
330330
}
331331

332+
.in-band > code {
333+
display: inline-block;
334+
}
335+
332336
#main { position: relative; }
333337
#main > .since {
334338
top: inherit;
@@ -447,7 +451,8 @@ a {
447451
}
448452

449453
.in-band:hover > .anchor {
450-
display: initial;
454+
display: inline-block;
455+
position: absolute;
451456
}
452457
.anchor {
453458
display: none;

0 commit comments

Comments
 (0)