Skip to content

Commit 07667f9

Browse files
committed
Update the remaining rustdoc tests with code-header
1 parent e2a67b9 commit 07667f9

Some content is hidden

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

61 files changed

+174
-174
lines changed

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

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

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

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_usize%3E-for-u8"]//h3' 'impl Trait<1_usize> for u8'
23-
// @has - '//*[@id="impl-Trait%3C2_usize%3E-for-u8"]//h3' 'impl Trait<2_usize> for u8'
24-
// @has - '//*[@id="impl-Trait%3C{1%20+%202}%3E-for-u8"]//h3' 'impl Trait<{1 + 2}> for u8'
25-
// @has - '//*[@id="impl-Trait%3CN%3E-for-%5Bu8%3B%20N%5D"]//h3' \
22+
// @has - '//*[@id="impl-Trait%3C1_usize%3E-for-u8"]//h3[@class="code-header in-band"]' 'impl Trait<1_usize> for u8'
23+
// @has - '//*[@id="impl-Trait%3C2_usize%3E-for-u8"]//h3[@class="code-header in-band"]' 'impl Trait<2_usize> 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"]' \
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 '//div[@id="impl"]/h3' 'impl<const M: usize> Foo<M> where u8: Trait<M>'
39+
// @has foo/struct.Foo.html '//div[@id="impl"]/h3[@class="code-header in-band"]' '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 '//div[@id="impl"]/h3' 'impl<const M: usize> Bar<u8, M>'
50+
// @has foo/struct.Bar.html '//div[@id="impl"]/h3[@class="code-header in-band"]' '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 '//div[@id="impl-Send"]/h3' 'impl<T, const ORDER: Order> Send for VSet<T, ORDER>'
13-
// @has foo/struct.VSet.html '//div[@id="impl-Sync"]/h3' 'impl<T, const ORDER: Order> Sync for VSet<T, ORDER>'
12+
// @has foo/struct.VSet.html '//div[@id="impl-Send"]/h3[@class="code-header in-band"]' 'impl<T, const ORDER: Order> Send for VSet<T, ORDER>'
13+
// @has foo/struct.VSet.html '//div[@id="impl-Sync"]/h3[@class="code-header in-band"]' '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 '//div[@id="impl"]/h3' 'impl<T> VSet<T, {Order::Sorted}>'
18+
// @has foo/struct.VSet.html '//div[@id="impl"]/h3[@class="code-header in-band"]' '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 '//div[@id="impl-1"]/h3' 'impl<T> VSet<T, {Order::Unsorted}>'
25+
// @has foo/struct.VSet.html '//div[@id="impl-1"]/h3[@class="code-header in-band"]' '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 '//div[@id="impl"]/h3' 'impl Escape<{ r#"<script>alert("Escape");</script>"# }>'
34+
// @has foo/struct.Escape.html '//div[@id="impl"]/h3[@class="code-header in-band"]' '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' 'impl Send for Foo'
15+
// @has - '//h3[@class="code-header in-band"]' 'impl Send for Foo'
1616
pub struct Foo {
1717
hasher: Hasher<[u8; 3]>,
1818
}

src/test/rustdoc/const.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pub struct Foo;
44

55
impl Foo {
6-
// @has const/struct.Foo.html '//*[@id="method.new"]//h4' 'const unsafe fn new'
6+
// @has const/struct.Foo.html '//*[@id="method.new"]//h4[@class="code-header"]' 'const unsafe fn new'
77
pub const unsafe fn new() -> Foo {
88
Foo
99
}

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// @has issue_33054/impls/struct.Foo.html
2-
// @has - '//h3' 'impl Foo'
3-
// @has - '//h3' 'impl Bar for Foo'
2+
// @has - '//h3[@class="code-header in-band"]' 'impl Foo'
3+
// @has - '//h3[@class="code-header in-band"]' 'impl Bar for Foo'
44
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
55
// @count - '//*[@id="main"]/details/summary/*[@class="impl has-srclink"]' 1
66
// @has issue_33054/impls/bar/trait.Bar.html
7-
// @has - '//h3' 'impl Bar for Foo'
7+
// @has - '//h3[@class="code-header in-band"]' 'impl Bar for Foo'
88
// @count - '//*[@class="struct"]' 1
99
pub mod impls;
1010

src/test/rustdoc/extern-impl-trait.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
extern crate extern_impl_trait;
66

7-
// @has 'foo/struct.X.html' '//h4' "impl Foo<Associated = ()> + 'a"
7+
// @has 'foo/struct.X.html' '//h4[@class="code-header"]' "impl Foo<Associated = ()> + 'a"
88
pub use extern_impl_trait::X;
99

10-
// @has 'foo/struct.Y.html' '//h4' "impl ?Sized + Foo<Associated = ()> + 'a"
10+
// @has 'foo/struct.Y.html' '//h4[@class="code-header"]' "impl ?Sized + Foo<Associated = ()> + 'a"
1111
pub use extern_impl_trait::Y;

src/test/rustdoc/extern-impl.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
pub struct Foo;
55

66
impl Foo {
7-
// @has - '//h4' 'fn rust0()'
7+
// @has - '//h4[@class="code-header"]' 'fn rust0()'
88
pub fn rust0() {}
9-
// @has - '//h4' 'fn rust1()'
9+
// @has - '//h4[@class="code-header"]' 'fn rust1()'
1010
pub extern "Rust" fn rust1() {}
11-
// @has - '//h4' 'extern "C" fn c0()'
11+
// @has - '//h4[@class="code-header"]' 'extern "C" fn c0()'
1212
pub extern fn c0() {}
13-
// @has - '//h4' 'extern "C" fn c1()'
13+
// @has - '//h4[@class="code-header"]' 'extern "C" fn c1()'
1414
pub extern "C" fn c1() {}
15-
// @has - '//h4' 'extern "system" fn system0()'
15+
// @has - '//h4[@class="code-header"]' 'extern "system" fn system0()'
1616
pub extern "system" fn system0() {}
1717
}
1818

1919
// @has foo/trait.Bar.html
2020
pub trait Bar {}
2121

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

src/test/rustdoc/extern-method.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
extern crate rustdoc_extern_method as foo;
77

88
// @has extern_method/trait.Foo.html //pre "pub trait Foo"
9-
// @has - '//*[@id="tymethod.foo"]//h4' 'extern "rust-call" fn foo'
10-
// @has - '//*[@id="method.foo_"]//h4' 'extern "rust-call" fn foo_'
9+
// @has - '//*[@id="tymethod.foo"]//h4[@class="code-header"]' 'extern "rust-call" fn foo'
10+
// @has - '//*[@id="method.foo_"]//h4[@class="code-header"]' 'extern "rust-call" fn foo_'
1111
pub use foo::Foo;
1212

1313
// @has extern_method/trait.Bar.html //pre "pub trait Bar"
1414
pub trait Bar {
15-
// @has - '//*[@id="tymethod.bar"]//h4' 'extern "rust-call" fn bar'
15+
// @has - '//*[@id="tymethod.bar"]//h4[@class="code-header"]' 'extern "rust-call" fn bar'
1616
extern "rust-call" fn bar(&self, _: ());
17-
// @has - '//*[@id="method.bar_"]//h4' 'extern "rust-call" fn bar_'
17+
// @has - '//*[@id="method.bar_"]//h4[@class="code-header"]' 'extern "rust-call" fn bar_'
1818
extern "rust-call" fn bar_(&self, _: ()) { }
1919
}

src/test/rustdoc/generic-impl.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
use std::fmt;
44

5-
// @!has foo/struct.Bar.html '//div[@id="impl-ToString"]//h3' 'impl<T> ToString for T'
5+
// @!has foo/struct.Bar.html '//div[@id="impl-ToString"]//h3[@class="code-header in-band"]' 'impl<T> ToString for T'
66
pub struct Bar;
77

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub struct Foo<'a> {
3838
// @has - '//span[@id="structfield.some_trait"]' "some_trait: &'a dyn for<'b> Trait<'b>"
3939

4040
impl<'a> Foo<'a> {
41-
// @has - '//h4' "pub fn bar<T>() where T: Trait<'a>,"
41+
// @has - '//h4[@class="code-header"]' "pub fn bar<T>() where T: Trait<'a>,"
4242
pub fn bar<T>()
4343
where
4444
T: Trait<'a>,

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' \
7+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
88
// "impl Foo for Bar<u8>"
99
impl Foo for Bar<u8> {}
10-
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3' \
10+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
1111
// "impl Foo for Bar<u16>"
1212
impl Foo for Bar<u16> {}
13-
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3' \
13+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
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' \
25+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
2626
// "impl Foo for foo::mod1::Baz"
2727
impl Foo for mod1::Baz {}
28-
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3' \
28+
// @has foo/trait.Foo.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
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' \
8+
// @has impl_parts/struct.Foo.html '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
99
// "impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync,"
10-
// @has impl_parts/trait.AnAutoTrait.html '//*[@class="item-list"]//h3' \
10+
// @has impl_parts/trait.AnAutoTrait.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
1111
// "impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync,"
1212
impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync {}

src/test/rustdoc/inline_cross/impl_trait.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ pub use impl_trait_aux::func4;
3131
pub use impl_trait_aux::async_fn;
3232

3333
// @has impl_trait/struct.Foo.html
34-
// @has - '//*[@id="method.method"]//h4' "pub fn method<'a>(_x: impl Clone + Into<Vec<u8, Global>> + 'a)"
35-
// @!has - '//*[@id="method.method"]//h4' 'where'
34+
// @has - '//*[@id="method.method"]//h4[@class="code-header"]' "pub fn method<'a>(_x: impl Clone + Into<Vec<u8, Global>> + 'a)"
35+
// @!has - '//*[@id="method.method"]//h4[@class="code-header"]' 'where'
3636
pub use impl_trait_aux::Foo;
3737

3838
// @has impl_trait/struct.Bar.html

src/test/rustdoc/inline_cross/issue-31948-1.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
extern crate rustdoc_nonreachable_impls;
66

77
// @has issue_31948_1/struct.Wobble.html
8-
// @has - '//*[@class="impl has-srclink"]//h3' 'Bark for'
9-
// @has - '//*[@class="impl has-srclink"]//h3' 'Woof for'
10-
// @!has - '//*[@class="impl"]//h3' 'Bar for'
11-
// @!has - '//*[@class="impl"]//h3' 'Qux for'
8+
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' 'Bark for'
9+
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' 'Woof for'
10+
// @!has - '//*[@class="impl"]//h3[@class="code-header in-band"]' 'Bar for'
11+
// @!has - '//*[@class="impl"]//h3[@class="code-header in-band"]' 'Qux for'
1212
pub use rustdoc_nonreachable_impls::hidden::Wobble;
1313

1414
// @has issue_31948_1/trait.Bark.html
15-
// @has - '//h3' 'for Foo'
16-
// @has - '//h3' 'for Wobble'
17-
// @!has - '//h3' 'for Wibble'
15+
// @has - '//h3[@class="code-header in-band"]' 'for Foo'
16+
// @has - '//h3[@class="code-header in-band"]' 'for Wobble'
17+
// @!has - '//h3[@class="code-header in-band"]' 'for Wibble'
1818
pub use rustdoc_nonreachable_impls::Bark;
1919

2020
// @has issue_31948_1/trait.Woof.html
21-
// @has - '//h3' 'for Foo'
22-
// @has - '//h3' 'for Wobble'
23-
// @!has - '//h3' 'for Wibble'
21+
// @has - '//h3[@class="code-header in-band"]' 'for Foo'
22+
// @has - '//h3[@class="code-header in-band"]' 'for Wobble'
23+
// @!has - '//h3[@class="code-header in-band"]' 'for Wibble'
2424
pub use rustdoc_nonreachable_impls::Woof;
2525

2626
// @!has issue_31948_1/trait.Bar.html

src/test/rustdoc/inline_cross/issue-31948-2.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
extern crate rustdoc_nonreachable_impls;
66

77
// @has issue_31948_2/struct.Wobble.html
8-
// @has - '//*[@class="impl has-srclink"]//h3' 'Qux for'
9-
// @has - '//*[@class="impl has-srclink"]//h3' 'Bark for'
10-
// @has - '//*[@class="impl has-srclink"]//h3' 'Woof for'
11-
// @!has - '//*[@class="impl"]//h3' 'Bar for'
8+
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' 'Qux for'
9+
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' 'Bark for'
10+
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' 'Woof for'
11+
// @!has - '//*[@class="impl"]//h3[@class="code-header in-band"]' 'Bar for'
1212
pub use rustdoc_nonreachable_impls::hidden::Wobble;
1313

1414
// @has issue_31948_2/trait.Qux.html
15-
// @has - '//h3' 'for Foo'
16-
// @has - '//h3' 'for Wobble'
15+
// @has - '//h3[@class="code-header in-band"]' 'for Foo'
16+
// @has - '//h3[@class="code-header in-band"]' 'for Wobble'
1717
pub use rustdoc_nonreachable_impls::hidden::Qux;
1818

1919
// @!has issue_31948_2/trait.Bar.html

src/test/rustdoc/inline_cross/issue-31948.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
extern crate rustdoc_nonreachable_impls;
66

77
// @has issue_31948/struct.Foo.html
8-
// @has - '//*[@class="impl has-srclink"]//h3' 'Bark for'
9-
// @has - '//*[@class="impl has-srclink"]//h3' 'Woof for'
10-
// @!has - '//*[@class="impl has-srclink"]//h3' 'Bar for'
11-
// @!has - '//*[@class="impl"]//h3' 'Qux for'
8+
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' 'Bark for'
9+
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' 'Woof for'
10+
// @!has - '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' 'Bar for'
11+
// @!has - '//*[@class="impl"]//h3[@class="code-header in-band"]' 'Qux for'
1212
pub use rustdoc_nonreachable_impls::Foo;
1313

1414
// @has issue_31948/trait.Bark.html
15-
// @has - '//h3' 'for Foo'
16-
// @!has - '//h3' 'for Wibble'
17-
// @!has - '//h3' 'for Wobble'
15+
// @has - '//h3[@class="code-header in-band"]' 'for Foo'
16+
// @!has - '//h3[@class="code-header in-band"]' 'for Wibble'
17+
// @!has - '//h3[@class="code-header in-band"]' 'for Wobble'
1818
pub use rustdoc_nonreachable_impls::Bark;
1919

2020
// @has issue_31948/trait.Woof.html
21-
// @has - '//h3' 'for Foo'
22-
// @!has - '//h3' 'for Wibble'
23-
// @!has - '//h3' 'for Wobble'
21+
// @has - '//h3[@class="code-header in-band"]' 'for Foo'
22+
// @!has - '//h3[@class="code-header in-band"]' 'for Wibble'
23+
// @!has - '//h3[@class="code-header in-band"]' 'for Wobble'
2424
pub use rustdoc_nonreachable_impls::Woof;
2525

2626
// @!has issue_31948/trait.Bar.html

src/test/rustdoc/inline_cross/issue-32881.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
extern crate rustdoc_trait_object_impl;
66

77
// @has issue_32881/trait.Bar.html
8-
// @has - '//h3' "impl<'a> dyn Bar"
9-
// @has - '//h3' "impl<'a> Debug for dyn Bar"
8+
// @has - '//h3[@class="code-header in-band"]' "impl<'a> dyn Bar"
9+
// @has - '//h3[@class="code-header in-band"]' "impl<'a> Debug for dyn Bar"
1010

1111
pub use rustdoc_trait_object_impl::Bar;

src/test/rustdoc/inline_cross/issue-33113.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
extern crate bar;
66

77
// @has issue_33113/trait.Bar.html
8-
// @has - '//h3' "for &'a char"
9-
// @has - '//h3' "for Foo"
8+
// @has - '//h3[@class="code-header in-band"]' "for &'a char"
9+
// @has - '//h3[@class="code-header in-band"]' "for Foo"
1010
pub use bar::Bar;

src/test/rustdoc/inline_cross/trait-vis.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
extern crate inner;
44

55
// @has trait_vis/struct.SomeStruct.html
6-
// @has - '//h3' 'impl Clone for SomeStruct'
6+
// @has - '//h3[@class="code-header in-band"]' 'impl Clone for SomeStruct'
77
pub use inner::SomeStruct;

src/test/rustdoc/inline_local/trait-vis.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ mod asdf {
1313
}
1414

1515
// @has trait_vis/struct.SomeStruct.html
16-
// @has - '//h3' 'impl ThisTrait for SomeStruct'
17-
// @!has - '//h3' 'impl PrivateTrait for SomeStruct'
16+
// @has - '//h3[@class="code-header in-band"]' 'impl ThisTrait for SomeStruct'
17+
// @!has - '//h3[@class="code-header in-band"]' 'impl PrivateTrait for SomeStruct'
1818
pub use asdf::SomeStruct;

src/test/rustdoc/issue-19190.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl Deref for Bar {
1414
}
1515

1616
// @has issue_19190/struct.Bar.html
17-
// @has - '//*[@id="method.foo"]//h4' 'fn foo(&self)'
17+
// @has - '//*[@id="method.foo"]//h4[@class="code-header"]' 'fn foo(&self)'
1818
// @has - '//*[@id="method.foo"]' 'fn foo(&self)'
19-
// @!has - '//*[@id="method.static_foo"]//h4' 'fn static_foo()'
19+
// @!has - '//*[@id="method.static_foo"]//h4[@class="code-header"]' 'fn static_foo()'
2020
// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'

0 commit comments

Comments
 (0)