Skip to content

Commit 8308c4b

Browse files
committed
rustdoc: update test cases for <section> tags in traits
1 parent 1dcbe72 commit 8308c4b

6 files changed

+11
-11
lines changed

src/test/rustdoc-gui/sidebar-mobile-scroll.goml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
66

77
// Scroll down.
88
scroll-to: "//h2[@id='blanket-implementations']"
9-
assert-window-property: {"pageYOffset": "639"}
9+
assert-window-property: {"pageYOffset": "651"}
1010

1111
// Open the sidebar menu.
1212
click: ".sidebar-menu-toggle"
@@ -21,11 +21,11 @@ assert-window-property: {"pageYOffset": "0"}
2121
// Close the sidebar menu. Make sure the scroll position gets restored.
2222
click: ".sidebar-menu-toggle"
2323
wait-for-css: (".sidebar", {"left": "-1000px"})
24-
assert-window-property: {"pageYOffset": "639"}
24+
assert-window-property: {"pageYOffset": "651"}
2525

2626
// Now test that scrollability returns when the browser window is just resized.
2727
click: ".sidebar-menu-toggle"
2828
wait-for-css: (".sidebar", {"left": "0px"})
2929
assert-window-property: {"pageYOffset": "0"}
3030
size: (900, 600)
31-
assert-window-property: {"pageYOffset": "639"}
31+
assert-window-property: {"pageYOffset": "651"}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div id="associatedconstant.YOLO" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#16">source</a><h4 class="code-header">const <a href="#associatedconstant.YOLO" class="constant">YOLO</a>: <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a></h4></div>
1+
<section id="associatedconstant.YOLO" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#16">source</a><h4 class="code-header">const <a href="#associatedconstant.YOLO" class="constant">YOLO</a>: <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a></h4></section>
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div id="method.bar" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#23">source</a><h4 class="code-header">fn <a href="#method.bar" class="fnname">bar</a>()</h4></div>
1+
<section id="method.bar" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#23">source</a><h4 class="code-header">fn <a href="#method.bar" class="fnname">bar</a>()</h4></section>
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div id="tymethod.foo" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#20">source</a><h4 class="code-header">fn <a href="#tymethod.foo" class="fnname">foo</a>()</h4></div>
1+
<section id="tymethod.foo" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#20">source</a><h4 class="code-header">fn <a href="#tymethod.foo" class="fnname">foo</a>()</h4></section>
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div id="associatedtype.T" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#13">source</a><h4 class="code-header">type <a href="#associatedtype.T" class="associatedtype">T</a></h4></div>
1+
<section id="associatedtype.T" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#13">source</a><h4 class="code-header">type <a href="#associatedtype.T" class="associatedtype">T</a></h4></section>

src/test/rustdoc/rfc-2632-const-trait-impl.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ pub struct S<T>(T);
1818
// @has - '//pre[@class="rust trait"]/code/span[@class="where"]' ': Clone'
1919
#[const_trait]
2020
pub trait Tr<T> {
21-
// @!has - '//div[@id="method.a"]/h4[@class="code-header"]' '~const'
22-
// @has - '//div[@id="method.a"]/h4[@class="code-header"]/a[@class="trait"]' 'Clone'
23-
// @!has - '//div[@id="method.a"]/h4[@class="code-header"]/span[@class="where"]' '~const'
24-
// @has - '//div[@id="method.a"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Clone'
21+
// @!has - '//section[@id="method.a"]/h4[@class="code-header"]' '~const'
22+
// @has - '//section[@id="method.a"]/h4[@class="code-header"]/a[@class="trait"]' 'Clone'
23+
// @!has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where"]' '~const'
24+
// @has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Clone'
2525
fn a<A: ~const Clone + ~const Destruct>()
2626
where
2727
Option<A>: ~const Clone + ~const Destruct,

0 commit comments

Comments
 (0)