about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>2017-08-29 21:41:01 +0000
committerGitHub <noreply@github.com>2017-08-29 21:41:01 +0000
commit588f83324d90bf46ee72b06efdcfc6ce2c01211d (patch)
tree52bea35f1fe9d9463621df68a68484af938c353c
parentd59aa7d846588253fb959c86491e2c2989d92354 (diff)
parentf50bf8636e3b0296db82e631fe95c84324a46ccc (diff)
downloadrust-588f83324d90bf46ee72b06efdcfc6ce2c01211d.tar.gz
rust-588f83324d90bf46ee72b06efdcfc6ce2c01211d.zip
Rollup merge of #44135 - GuillaumeGomez:fix-css-links, r=QuietMisdreavus
Fix invalid linker position

Fixes #44120.

Result isn't "optimal" though because there are spaces at the end of some lines.
-rw-r--r--src/librustdoc/html/format.rs2
-rw-r--r--src/librustdoc/html/render.rs6
-rw-r--r--src/librustdoc/html/static/rustdoc.css7
3 files changed, 9 insertions, 6 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 988890ffedc..10a3878073e 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -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 {
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index 5457f69cb6d..5b8c7503a79 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -1523,8 +1523,7 @@ 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 ")?,
@@ -1532,8 +1531,7 @@ impl<'a> fmt::Display for Item<'a> {
             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.
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 4a3286b421a..312dfce8d39 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -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;
@@ -447,7 +451,8 @@ a {
 }
 
 .in-band:hover > .anchor {
-	display: initial;
+	display: inline-block;
+	position: absolute;
 }
 .anchor {
 	display: none;