Skip to content

Commit

Permalink
Rollup merge of rust-lang#44135 - GuillaumeGomez:fix-css-links, r=Qui…
Browse files Browse the repository at this point in the history
…etMisdreavus

Fix invalid linker position

Fixes rust-lang#44120.

Result isn't "optimal" though because there are spaces at the end of some lines.
  • Loading branch information
Ariel Ben-Yehuda committed Aug 29, 2017
2 parents 35fbe62 + f50bf86 commit b7b5dbc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl<'a> fmt::Display for WhereClause<'a> {
}

if end_newline {
//add a space so stripping <br> tags and breaking spaces still renders properly
// add a space so stripping <br> tags and breaking spaces still renders properly
if f.alternate() {
clause.push(' ');
} else {
Expand Down
6 changes: 2 additions & 4 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1523,17 +1523,15 @@ impl<'a> fmt::Display for Item<'a> {
} else {
write!(fmt, "Module ")?;
},
clean::FunctionItem(..) | clean::ForeignFunctionItem(..) =>
write!(fmt, "Function ")?,
clean::FunctionItem(..) | clean::ForeignFunctionItem(..) => write!(fmt, "Function ")?,
clean::TraitItem(..) => write!(fmt, "Trait ")?,
clean::StructItem(..) => write!(fmt, "Struct ")?,
clean::UnionItem(..) => write!(fmt, "Union ")?,
clean::EnumItem(..) => write!(fmt, "Enum ")?,
clean::TypedefItem(..) => write!(fmt, "Type Definition ")?,
clean::MacroItem(..) => write!(fmt, "Macro ")?,
clean::PrimitiveItem(..) => write!(fmt, "Primitive Type ")?,
clean::StaticItem(..) | clean::ForeignStaticItem(..) =>
write!(fmt, "Static ")?,
clean::StaticItem(..) | clean::ForeignStaticItem(..) => write!(fmt, "Static ")?,
clean::ConstantItem(..) => write!(fmt, "Constant ")?,
_ => {
// We don't generate pages for any other type.
Expand Down
7 changes: 6 additions & 1 deletion src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ h4 > code, h3 > code, .invisible > code {
display: inline-block;
}

.in-band > code {
display: inline-block;
}

#main { position: relative; }
#main > .since {
top: inherit;
Expand Down Expand Up @@ -447,7 +451,8 @@ a {
}

.in-band:hover > .anchor {
display: initial;
display: inline-block;
position: absolute;
}
.anchor {
display: none;
Expand Down

0 comments on commit b7b5dbc

Please sign in to comment.