Skip to content

Commit

Permalink
Rollup merge of #33542 - GuillaumeGomez:move_since, r=steveklabnik
Browse files Browse the repository at this point in the history
Improve "since" tag placement

Continuation of #33431.

r? @steveklabnik
  • Loading branch information
steveklabnik committed May 10, 2016
2 parents 26cca1a + a5a2f2b commit d0580a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,6 @@ impl<'a> Item<'a> {
}
}


impl<'a> fmt::Display for Item<'a> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
debug_assert!(!self.item.is_stripped());
Expand Down Expand Up @@ -1575,6 +1574,9 @@ impl<'a> fmt::Display for Item<'a> {

write!(fmt, "</span>")?; // in-band
write!(fmt, "<span class='out-of-band'>")?;
if let Some(version) = self.item.stable_since() {
write!(fmt, "<span class='since'>{}</span>", version)?;
}
write!(fmt,
r##"<span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
Expand Down Expand Up @@ -1922,7 +1924,6 @@ fn item_function(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
generics = f.generics,
where_clause = WhereClause(&f.generics),
decl = f.decl)?;
render_stability_since_raw(w, it.stable_since(), None)?;
document(w, cx, it)
}

Expand Down Expand Up @@ -2236,7 +2237,6 @@ fn item_struct(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
"",
true)?;
write!(w, "</pre>")?;
render_stability_since_raw(w, it.stable_since(), None)?;

document(w, cx, it)?;
let mut fields = s.fields.iter().filter(|f| {
Expand Down
6 changes: 6 additions & 0 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,12 @@ a.test-arrow {
padding-left: 10px;
}

span.since {
position: initial;
font-size: 20px;
margin-right: 5px;
}

/* Media Queries */

@media (max-width: 700px) {
Expand Down

0 comments on commit d0580a7

Please sign in to comment.