Skip to content

Commit a7d45de

Browse files
authored
Rollup merge of #102280 - notriddle:notriddle/band, r=GuillaumeGomez
rustdoc: clean up `.out-of-band`/`.in-band` CSS | | method | impl |--------|--------|------ | before | ![image](https://user-images.githubusercontent.com/1593513/192164603-dea9befb-0f5f-4bd5-a44d-1f8328e27955.png) | ![image](https://user-images.githubusercontent.com/1593513/192164642-06f958cb-8fd5-4b73-bdb7-d2778f358f80.png) | after | ![image](https://user-images.githubusercontent.com/1593513/192164612-f72ee8db-c87c-477c-99e8-283b1cf0c14b.png) | ![image](https://user-images.githubusercontent.com/1593513/192164653-8e628dc3-5bf3-4ce8-829b-06e27a90fe06.png) * Remove the `float: right` fallback from the main header, which hasn't been needed since IE11 support was dropped. * Remove `in-band` from low-level headers, which hasn't been needed since `.rightside` switched to `float: right` in 593d6d1 * Remove unreachable `.in-band > code, .in-band > .code-header` CSS, since the `in-band` class was attached to the `code-header` itself, not nested directly below it. * Use `rem` instead of `em` for code header margins. * This results in a slight change in spacing around impls and item-info, but since it makes it more consistent with the way methods are presented, it's probably fine. Preview: http://notriddle.com/notriddle-rustdoc-demos/band/std/fs/struct.File.html
2 parents beb2240 + a50081e commit a7d45de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+159
-165
lines changed

src/librustdoc/html/render/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ pub(crate) fn render_impl_summary(
17901790
write!(w, "<section id=\"{}\" class=\"impl has-srclink\"{}>", id, aliases);
17911791
render_rightside(w, cx, &i.impl_item, containing_item, RenderMode::Normal);
17921792
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
1793-
write!(w, "<h3 class=\"code-header in-band\">");
1793+
write!(w, "<h3 class=\"code-header\">");
17941794

17951795
if let Some(use_absolute) = use_absolute {
17961796
write!(w, "{}", inner_impl.print(use_absolute, cx));

src/librustdoc/html/static/css/rustdoc.css

+7-12
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ h4.code-header {
176176
border-bottom-style: none;
177177
margin: 0;
178178
padding: 0;
179-
margin-top: 0.6em;
180-
margin-bottom: 0.4em;
179+
margin-top: 0.6rem;
180+
margin-bottom: 0.4rem;
181181
}
182182
.impl,
183183
.impl-items .method,
@@ -658,18 +658,17 @@ h2.location a {
658658
overflow-x: auto;
659659
}
660660

661-
.content .out-of-band {
661+
.out-of-band {
662662
flex-grow: 0;
663663
font-size: 1.125rem;
664664
font-weight: normal;
665-
float: right;
666665
}
667666

668667
.method > .code-header, .trait-impl > .code-header {
669668
display: block;
670669
}
671670

672-
.content .in-band {
671+
.in-band {
673672
flex-grow: 1;
674673
margin: 0px;
675674
padding: 0px;
@@ -682,10 +681,6 @@ h2.location a {
682681
background-color: var(--main-background-color);
683682
}
684683

685-
.in-band > code, .in-band > .code-header {
686-
display: inline-block;
687-
}
688-
689684
.docblock code, .docblock-short code,
690685
pre, .rustdoc.source .example-wrap {
691686
background-color: var(--code-block-background-color);
@@ -1731,13 +1726,13 @@ in storage.js plus the media query with (min-width: 701px)
17311726
flex-direction: column;
17321727
}
17331728

1734-
.content .out-of-band {
1729+
.out-of-band {
17351730
text-align: left;
17361731
margin-left: initial;
17371732
padding: initial;
17381733
}
17391734

1740-
.content .out-of-band .since::before {
1735+
.out-of-band .since::before {
17411736
content: "Since ";
17421737
}
17431738

@@ -1969,7 +1964,7 @@ in storage.js plus the media query with (min-width: 701px)
19691964
}
19701965

19711966
@media print {
1972-
nav.sidebar, nav.sub, .content .out-of-band, a.srclink, #copy-path,
1967+
nav.sidebar, nav.sub, .out-of-band, a.srclink, #copy-path,
19731968
details.rustdoc-toggle[open] > summary::before, details.rustdoc-toggle > summary::before,
19741969
details.rustdoc-toggle.top-doc > summary {
19751970
display: none;

src/librustdoc/html/static/js/main.js

-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,6 @@ function loadCss(cssFileName) {
555555
const code = document.createElement("h3");
556556
code.innerHTML = struct[TEXT_IDX];
557557
addClass(code, "code-header");
558-
addClass(code, "in-band");
559558

560559
onEachLazy(code.getElementsByTagName("a"), elem => {
561560
const href = elem.getAttribute("href");

src/test/rustdoc-gui/headers-color.goml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ assert-css: (
1919
)
2020
assert-css: (
2121
".impl .code-header",
22-
{"color": "rgb(230, 225, 207)", "background-color": "rgb(15, 20, 25)"},
22+
{"color": "rgb(230, 225, 207)", "background-color": "rgba(0, 0, 0, 0)"},
2323
ALL,
2424
)
2525

@@ -58,7 +58,7 @@ assert-css: (
5858
)
5959
assert-css: (
6060
".impl .code-header",
61-
{"color": "rgb(221, 221, 221)", "background-color": "rgb(53, 53, 53)"},
61+
{"color": "rgb(221, 221, 221)", "background-color": "rgba(0, 0, 0, 0)"},
6262
ALL,
6363
)
6464

@@ -95,7 +95,7 @@ assert-css: (
9595
)
9696
assert-css: (
9797
".impl .code-header",
98-
{"color": "rgb(0, 0, 0)", "background-color": "rgb(255, 255, 255)"},
98+
{"color": "rgb(0, 0, 0)", "background-color": "rgba(0, 0, 0, 0)"},
9999
ALL,
100100
)
101101

src/test/rustdoc-gui/implementors.goml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ assert-count: ("#implementors-list .impl", 2)
88
assert: ("#implementors-list .impl:nth-child(1) > a.anchor")
99
assert-attribute: ("#implementors-list .impl:nth-child(1)", {"id": "impl-Whatever-for-Struct"})
1010
assert-attribute: ("#implementors-list .impl:nth-child(1) > a.anchor", {"href": "#impl-Whatever-for-Struct"})
11-
assert: "#implementors-list .impl:nth-child(1) > .code-header.in-band"
11+
assert: "#implementors-list .impl:nth-child(1) > .code-header"
1212

1313
assert: ("#implementors-list .impl:nth-child(2) > a.anchor")
1414
assert-attribute: ("#implementors-list .impl:nth-child(2)", {"id": "impl-Whatever-1"})
1515
assert-attribute: ("#implementors-list .impl:nth-child(2) > a.anchor", {"href": "#impl-Whatever-1"})
16-
assert: "#implementors-list .impl:nth-child(2) > .code-header.in-band"
16+
assert: "#implementors-list .impl:nth-child(2) > .code-header"
1717

1818
goto: file://|DOC_PATH|/test_docs/struct.HasEmptyTraits.html
1919
compare-elements-position-near-false: (
2020
"#impl-EmptyTrait1-for-HasEmptyTraits",
2121
"#impl-EmptyTrait2-for-HasEmptyTraits",
22-
{"y": 30},
22+
{"y": 34},
2323
)
2424
compare-elements-position-near: (
2525
"#impl-EmptyTrait3-for-HasEmptyTraits h3",
2626
"#impl-EmptyTrait3-for-HasEmptyTraits .item-info",
27-
{"y": 30},
27+
{"y": 34},
2828
)
2929

3030
// Now check that re-exports work correctly.

src/test/rustdoc-gui/src-font-size.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ goto: file://|DOC_PATH|/test_docs/struct.Foo.html
55
show-text: true
66
// Check the impl headers.
77
assert-css: (".impl.has-srclink .srclink", {"font-size": "16px"}, ALL)
8-
assert-css: (".impl.has-srclink .code-header.in-band", {"font-size": "18px"}, ALL)
8+
assert-css: (".impl.has-srclink .code-header", {"font-size": "18px"}, ALL)
99
// Check the impl items.
1010
assert-css: (".impl-items .has-srclink .srclink", {"font-size": "16px"}, ALL)
1111
assert-css: (".impl-items .has-srclink .code-header", {"font-size": "16px"}, ALL)

src/test/rustdoc/anonymous-lifetime.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub trait Stream {
1212
}
1313

1414
// @has 'foo/trait.Stream.html'
15-
// @has - '//*[@class="code-header in-band"]' 'impl<S: ?Sized + Stream + Unpin> Stream for &mut S'
15+
// @has - '//*[@class="code-header"]' 'impl<S: ?Sized + Stream + Unpin> Stream for &mut S'
1616
impl<S: ?Sized + Stream + Unpin> Stream for &mut S {
1717
type Item = S::Item;
1818

src/test/rustdoc/assoc-consts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub trait Foo {
1313
pub struct Bar;
1414

1515
impl Foo for Bar {
16-
// @has assoc_consts/struct.Bar.html '//h3[@class="code-header in-band"]' 'impl Foo for Bar'
16+
// @has assoc_consts/struct.Bar.html '//h3[@class="code-header"]' 'impl Foo for Bar'
1717
// @has - '//*[@id="associatedconstant.FOO"]' 'const FOO: usize'
1818
const FOO: usize = 12;
1919
// @has - '//*[@id="associatedconstant.FOO_NO_DEFAULT"]' 'const FOO_NO_DEFAULT: bool'
@@ -81,7 +81,7 @@ pub trait Qux {
8181
const QUX_DEFAULT2: u32 = 3;
8282
}
8383

84-
// @has assoc_consts/struct.Bar.html '//h3[@class="code-header in-band"]' 'impl Qux for Bar'
84+
// @has assoc_consts/struct.Bar.html '//h3[@class="code-header"]' 'impl Qux for Bar'
8585
impl Qux for Bar {
8686
// @has - '//*[@id="associatedconstant.QUX0"]' 'const QUX0: u8'
8787
// @has - '//*[@class="docblock"]' "Docs for QUX0 in trait."

src/test/rustdoc/blanket-reexport-item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![crate_name = "foo"]
22

3-
// @has foo/struct.S.html '//*[@id="impl-Into%3CU%3E-for-S"]//h3[@class="code-header in-band"]' 'impl<T, U> Into<U> for T'
3+
// @has foo/struct.S.html '//*[@id="impl-Into%3CU%3E-for-S"]//h3[@class="code-header"]' 'impl<T, U> Into<U> for T'
44
pub struct S2 {}
55
mod m {
66
pub struct S {}

src/test/rustdoc/const-generics/add-impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub struct Simd<T, const WIDTH: usize> {
77
inner: T,
88
}
99

10-
// @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]//h3[@class="code-header in-band"]' 'impl Add<Simd<u8, 16>> for Simd<u8, 16>'
10+
// @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl Add<Simd<u8, 16>> for Simd<u8, 16>'
1111
impl Add for Simd<u8, 16> {
1212
type Output = Self;
1313

src/test/rustdoc/const-generics/const-generics-docs.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ pub use extern_crate::WTrait;
1919

2020
// @has foo/trait.Trait.html '//pre[@class="rust trait"]' \
2121
// 'pub trait Trait<const N: usize>'
22-
// @has - '//*[@id="impl-Trait%3C1%3E-for-u8"]//h3[@class="code-header in-band"]' 'impl Trait<1> for u8'
23-
// @has - '//*[@id="impl-Trait%3C2%3E-for-u8"]//h3[@class="code-header in-band"]' 'impl Trait<2> for u8'
24-
// @has - '//*[@id="impl-Trait%3C{1%20+%202}%3E-for-u8"]//h3[@class="code-header in-band"]' 'impl Trait<{1 + 2}> for u8'
25-
// @has - '//*[@id="impl-Trait%3CN%3E-for-%5Bu8%3B%20N%5D"]//h3[@class="code-header in-band"]' \
22+
// @has - '//*[@id="impl-Trait%3C1%3E-for-u8"]//h3[@class="code-header"]' 'impl Trait<1> for u8'
23+
// @has - '//*[@id="impl-Trait%3C2%3E-for-u8"]//h3[@class="code-header"]' 'impl Trait<2> for u8'
24+
// @has - '//*[@id="impl-Trait%3C{1%20+%202}%3E-for-u8"]//h3[@class="code-header"]' 'impl Trait<{1 + 2}> for u8'
25+
// @has - '//*[@id="impl-Trait%3CN%3E-for-%5Bu8%3B%20N%5D"]//h3[@class="code-header"]' \
2626
// 'impl<const N: usize> Trait<N> for [u8; N]'
2727
pub trait Trait<const N: usize> {}
2828
impl Trait<1> for u8 {}
@@ -36,7 +36,7 @@ pub struct Foo<const N: usize> where u8: Trait<N>;
3636
// @has foo/struct.Bar.html '//pre[@class="rust struct"]' 'pub struct Bar<T, const N: usize>(_)'
3737
pub struct Bar<T, const N: usize>([T; N]);
3838

39-
// @has foo/struct.Foo.html '//*[@id="impl-Foo%3CM%3E"]/h3[@class="code-header in-band"]' 'impl<const M: usize> Foo<M>where u8: Trait<M>'
39+
// @has foo/struct.Foo.html '//*[@id="impl-Foo%3CM%3E"]/h3[@class="code-header"]' 'impl<const M: usize> Foo<M>where u8: Trait<M>'
4040
impl<const M: usize> Foo<M> where u8: Trait<M> {
4141
// @has - '//*[@id="associatedconstant.FOO_ASSOC"]' 'pub const FOO_ASSOC: usize'
4242
pub const FOO_ASSOC: usize = M + 13;
@@ -47,7 +47,7 @@ impl<const M: usize> Foo<M> where u8: Trait<M> {
4747
}
4848
}
4949

50-
// @has foo/struct.Bar.html '//*[@id="impl-Bar%3Cu8%2C%20M%3E"]/h3[@class="code-header in-band"]' 'impl<const M: usize> Bar<u8, M>'
50+
// @has foo/struct.Bar.html '//*[@id="impl-Bar%3Cu8%2C%20M%3E"]/h3[@class="code-header"]' 'impl<const M: usize> Bar<u8, M>'
5151
impl<const M: usize> Bar<u8, M> {
5252
// @has - '//*[@id="method.hey"]' \
5353
// 'pub fn hey<const N: usize>(&self) -> Foo<N>where u8: Trait<N>'

src/test/rustdoc/const-generics/const-impl.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ pub enum Order {
99
}
1010

1111
// @has foo/struct.VSet.html '//pre[@class="rust struct"]' 'pub struct VSet<T, const ORDER: Order>'
12-
// @has foo/struct.VSet.html '//*[@id="impl-Send-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header in-band"]' 'impl<T, const ORDER: Order> Send for VSet<T, ORDER>'
13-
// @has foo/struct.VSet.html '//*[@id="impl-Sync-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header in-band"]' 'impl<T, const ORDER: Order> Sync for VSet<T, ORDER>'
12+
// @has foo/struct.VSet.html '//*[@id="impl-Send-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header"]' 'impl<T, const ORDER: Order> Send for VSet<T, ORDER>'
13+
// @has foo/struct.VSet.html '//*[@id="impl-Sync-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header"]' 'impl<T, const ORDER: Order> Sync for VSet<T, ORDER>'
1414
pub struct VSet<T, const ORDER: Order> {
1515
inner: Vec<T>,
1616
}
1717

18-
// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT%2C%20{%20Order%3A%3ASorted%20}%3E"]/h3[@class="code-header in-band"]' 'impl<T> VSet<T, { Order::Sorted }>'
18+
// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT%2C%20{%20Order%3A%3ASorted%20}%3E"]/h3[@class="code-header"]' 'impl<T> VSet<T, { Order::Sorted }>'
1919
impl<T> VSet<T, { Order::Sorted }> {
2020
pub fn new() -> Self {
2121
Self { inner: Vec::new() }
2222
}
2323
}
2424

25-
// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT%2C%20{%20Order%3A%3AUnsorted%20}%3E"]/h3[@class="code-header in-band"]' 'impl<T> VSet<T, { Order::Unsorted }>'
25+
// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT%2C%20{%20Order%3A%3AUnsorted%20}%3E"]/h3[@class="code-header"]' 'impl<T> VSet<T, { Order::Unsorted }>'
2626
impl<T> VSet<T, { Order::Unsorted }> {
2727
pub fn new() -> Self {
2828
Self { inner: Vec::new() }
@@ -31,7 +31,7 @@ impl<T> VSet<T, { Order::Unsorted }> {
3131

3232
pub struct Escape<const S: &'static str>;
3333

34-
// @has foo/struct.Escape.html '//*[@id="impl-Escape%3Cr#%22%3Cscript%3Ealert(%22Escape%22)%3B%3C/script%3E%22#%3E"]/h3[@class="code-header in-band"]' 'impl Escape<r#"<script>alert("Escape");</script>"#>'
34+
// @has foo/struct.Escape.html '//*[@id="impl-Escape%3Cr#%22%3Cscript%3Ealert(%22Escape%22)%3B%3C/script%3E%22#%3E"]/h3[@class="code-header"]' 'impl Escape<r#"<script>alert("Escape");</script>"#>'
3535
impl Escape<r#"<script>alert("Escape");</script>"#> {
3636
pub fn f() {}
3737
}

src/test/rustdoc/const-generics/lazy_normalization_consts/const-equate-pred.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub struct Hasher<T> {
1212
unsafe impl<T: Default> Send for Hasher<T> {}
1313

1414
// @has foo/struct.Foo.html
15-
// @has - '//h3[@class="code-header in-band"]' 'impl Send for Foo'
15+
// @has - '//h3[@class="code-header"]' 'impl Send for Foo'
1616
pub struct Foo {
1717
hasher: Hasher<[u8; 3]>,
1818
}

src/test/rustdoc/duplicate_impls/issue-33054.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// ignore-tidy-linelength
22

33
// @has issue_33054/impls/struct.Foo.html
4-
// @has - '//h3[@class="code-header in-band"]' 'impl Foo'
5-
// @has - '//h3[@class="code-header in-band"]' 'impl Bar for Foo'
4+
// @has - '//h3[@class="code-header"]' 'impl Foo'
5+
// @has - '//h3[@class="code-header"]' 'impl Bar for Foo'
66
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
77
// @count - '//*[@id="main-content"]/div[@id="implementations-list"]/details/summary/*[@class="impl has-srclink"]' 1
88
// @has issue_33054/impls/bar/trait.Bar.html
9-
// @has - '//h3[@class="code-header in-band"]' 'impl Bar for Foo'
9+
// @has - '//h3[@class="code-header"]' 'impl Bar for Foo'
1010
// @count - '//*[@class="struct"]' 1
1111
pub mod impls;
1212

src/test/rustdoc/empty-impl-block.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ pub struct Another;
1616
pub trait Bar {}
1717

1818
// @has 'foo/struct.Another.html'
19-
// @has - '//h3[@class="code-header in-band"]' 'impl Bar for Another'
19+
// @has - '//h3[@class="code-header"]' 'impl Bar for Another'
2020
impl Bar for Another {}

src/test/rustdoc/extern-impl.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ impl Foo {
1919
// @has foo/trait.Bar.html
2020
pub trait Bar {}
2121

22-
// @has - '//h3[@class="code-header in-band"]' 'impl Bar for fn()'
22+
// @has - '//h3[@class="code-header"]' 'impl Bar for fn()'
2323
impl Bar for fn() {}
24-
// @has - '//h3[@class="code-header in-band"]' 'impl Bar for extern "C" fn()'
24+
// @has - '//h3[@class="code-header"]' 'impl Bar for extern "C" fn()'
2525
impl Bar for extern fn() {}
26-
// @has - '//h3[@class="code-header in-band"]' 'impl Bar for extern "system" fn()'
26+
// @has - '//h3[@class="code-header"]' 'impl Bar for extern "system" fn()'
2727
impl Bar for extern "system" fn() {}

src/test/rustdoc/fn-bound.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub struct ConditionalIterator<F> {
1111
}
1212

1313

14-
// @has 'fn_bound/struct.ConditionalIterator.html' '//h3[@class="code-header in-band"]' 'impl<F: Fn(&i32)> Iterator for ConditionalIterator<F>'
14+
// @has 'fn_bound/struct.ConditionalIterator.html' '//h3[@class="code-header"]' 'impl<F: Fn(&i32)> Iterator for ConditionalIterator<F>'
1515
impl<F: Fn(&i32)> Iterator for ConditionalIterator<F> {
1616
type Item = ();
1717

src/test/rustdoc/generic-impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::fmt;
55
// @!has foo/struct.Bar.html '//*[@id="impl-ToString-for-Bar"]' ''
66
pub struct Bar;
77

8-
// @has foo/struct.Foo.html '//*[@id="impl-ToString-for-Foo"]//h3[@class="code-header in-band"]' 'impl<T> ToString for T'
8+
// @has foo/struct.Foo.html '//*[@id="impl-ToString-for-Foo"]//h3[@class="code-header"]' 'impl<T> ToString for T'
99
pub struct Foo;
1010
// @has foo/struct.Foo.html '//*[@class="sidebar-elems"]//section//a[@href="#impl-ToString-for-Foo"]' 'ToString'
1111

src/test/rustdoc/higher-ranked-trait-bounds.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl<'a> Foo<'a> {
4949
// @has foo/trait.B.html
5050
pub trait B<'x> {}
5151

52-
// @has - '//h3[@class="code-header in-band"]' "impl<'a> B<'a> for dyn for<'b> Trait<'b>"
52+
// @has - '//h3[@class="code-header"]' "impl<'a> B<'a> for dyn for<'b> Trait<'b>"
5353
impl<'a> B<'a> for dyn for<'b> Trait<'b> {}
5454

5555
// @has foo/struct.Bar.html

src/test/rustdoc/impl-disambiguation.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ pub trait Foo {}
44

55
pub struct Bar<T> { field: T }
66

7-
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
7+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \
88
// "impl Foo for Bar<u8>"
99
impl Foo for Bar<u8> {}
10-
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
10+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \
1111
// "impl Foo for Bar<u16>"
1212
impl Foo for Bar<u16> {}
13-
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
13+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \
1414
// "impl<'a> Foo for &'a Bar<u8>"
1515
impl<'a> Foo for &'a Bar<u8> {}
1616

@@ -22,9 +22,9 @@ pub mod mod2 {
2222
pub enum Baz {}
2323
}
2424

25-
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
25+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \
2626
// "impl Foo for foo::mod1::Baz"
2727
impl Foo for mod1::Baz {}
28-
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
28+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header"]' \
2929
// "impl<'a> Foo for &'a foo::mod2::Baz"
3030
impl<'a> Foo for &'a mod2::Baz {}

src/test/rustdoc/impl-parts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ pub auto trait AnAutoTrait {}
55

66
pub struct Foo<T> { field: T }
77

8-
// @has impl_parts/struct.Foo.html '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
8+
// @has impl_parts/struct.Foo.html '//*[@class="impl has-srclink"]//h3[@class="code-header"]' \
99
// "impl<T: Clone> !AnAutoTrait for Foo<T>where T: Sync,"
10-
// @has impl_parts/trait.AnAutoTrait.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
10+
// @has impl_parts/trait.AnAutoTrait.html '//*[@class="item-list"]//h3[@class="code-header"]' \
1111
// "impl<T: Clone> !AnAutoTrait for Foo<T>where T: Sync,"
1212
impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync {}

0 commit comments

Comments
 (0)