Skip to content

Commit 17ccd3b

Browse files
committed
Update rustdoc tests
1 parent 30f97fe commit 17ccd3b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

tests/rustdoc/check-source-code-urls-to-def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl Foo {
2828

2929
fn babar() {}
3030

31-
//@ has - '//pre[@class="rust"]//a/@href' '/struct.String.html'
31+
//@ has - '//pre[@class="rust"]//a/@href' '/type.String.html'
3232
//@ has - '//pre[@class="rust"]//a/@href' '/primitive.u32.html'
3333
//@ has - '//pre[@class="rust"]//a/@href' '/primitive.str.html'
3434
//@ count - '//pre[@class="rust"]//a[@href="#23"]' 5

tests/rustdoc/decl-trailing-whitespace.declaration.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
// Required methods
33
fn <a href="#tymethod.poll_write" class="fn">poll_write</a>(
44
self,
5-
cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
5+
cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="type" href="{{channel}}/alloc/string/type.String.html" title="type alloc::string::String">String</a>&gt;,
66
buf: &amp;mut [<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>],
77
) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
8-
<span class="item-spacer" /> fn <a href="#tymethod.poll_flush" class="fn">poll_flush</a>(self, cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
9-
<span class="item-spacer" /> fn <a href="#tymethod.poll_close" class="fn">poll_close</a>(self, cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
8+
<span class="item-spacer" /> fn <a href="#tymethod.poll_flush" class="fn">poll_flush</a>(self, cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="type" href="{{channel}}/alloc/string/type.String.html" title="type alloc::string::String">String</a>&gt;) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
9+
<span class="item-spacer" /> fn <a href="#tymethod.poll_close" class="fn">poll_close</a>(self, cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="type" href="{{channel}}/alloc/string/type.String.html" title="type alloc::string::String">String</a>&gt;) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
1010

1111
// Provided method
1212
fn <a href="#method.poll_write_vectored" class="fn">poll_write_vectored</a>(
1313
self,
14-
cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
14+
cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="type" href="{{channel}}/alloc/string/type.String.html" title="type alloc::string::String">String</a>&gt;,
1515
bufs: &amp;[<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>],
1616
) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt; { ... }
1717
}</code>

tests/rustdoc/intra-doc/associated-items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/// [`String::from`] is ambiguous as to which `From` impl
55
/// [Vec::into_iter()] uses a disambiguator
66
//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/collections/btree/map/struct.BTreeMap.html#method.into_iter"]' 'std::collections::BTreeMap::into_iter'
7-
//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/string/struct.String.html#method.from"]' 'String::from'
7+
//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/string/string/struct.String.html#method.from"]' 'String::from'
88
//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/vec/struct.Vec.html#method.into_iter"]' 'Vec::into_iter'
99
pub fn foo() {}
1010

tests/rustdoc/masked.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ extern crate masked;
99

1010
//@ !hasraw 'search-index.js' 'masked_method'
1111

12-
//@ !hasraw 'foo/struct.String.html' 'MaskedTrait'
13-
//@ !hasraw 'foo/struct.String.html' 'MaskedBlanketTrait'
14-
//@ !hasraw 'foo/struct.String.html' 'masked_method'
12+
//@ !hasraw 'foo/type.String.html' 'MaskedTrait'
13+
//@ !hasraw 'foo/type.String.html' 'MaskedBlanketTrait'
14+
//@ !hasraw 'foo/type.String.html' 'masked_method'
1515
pub use std::string::String;
1616

1717
//@ !hasraw 'foo/trait.Clone.html' 'MaskedStruct'

0 commit comments

Comments
 (0)