diff options
| author | Michael Howell <michael@notriddle.com> | 2022-06-02 14:28:18 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-06-02 15:02:19 -0700 |
| commit | 7dd3861235ecdcdfb0d5d992f9a8a698ab8caee6 (patch) | |
| tree | 5f885197fa845fa5858cc3e6c97c83fedd97c9c4 /src/test/rustdoc | |
| parent | e71440575c930dcecac288b7c3536410d688b351 (diff) | |
| download | rust-7dd3861235ecdcdfb0d5d992f9a8a698ab8caee6.tar.gz rust-7dd3861235ecdcdfb0d5d992f9a8a698ab8caee6.zip | |
rustdoc: clean up primitive.slice.html links
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/slice-links.link_box_generic.html | 1 | ||||
| -rw-r--r-- | src/test/rustdoc/slice-links.link_box_u32.html | 1 | ||||
| -rw-r--r-- | src/test/rustdoc/slice-links.link_slice_generic.html | 1 | ||||
| -rw-r--r-- | src/test/rustdoc/slice-links.link_slice_u32.html | 1 | ||||
| -rw-r--r-- | src/test/rustdoc/slice-links.rs | 28 |
5 files changed, 32 insertions, 0 deletions
diff --git a/src/test/rustdoc/slice-links.link_box_generic.html b/src/test/rustdoc/slice-links.link_box_generic.html new file mode 100644 index 00000000000..38aaf20808c --- /dev/null +++ b/src/test/rustdoc/slice-links.link_box_generic.html @@ -0,0 +1 @@ +<code>pub fn delta<T>() -> <a class="struct" href="struct.MyBox.html" title="struct foo::MyBox">MyBox</a><<a class="primitive" href="{{channel}}/core/primitive.slice.html">[T]</a>></code> \ No newline at end of file diff --git a/src/test/rustdoc/slice-links.link_box_u32.html b/src/test/rustdoc/slice-links.link_box_u32.html new file mode 100644 index 00000000000..42fd721a4ac --- /dev/null +++ b/src/test/rustdoc/slice-links.link_box_u32.html @@ -0,0 +1 @@ +<code>pub fn gamma() -> <a class="struct" href="struct.MyBox.html" title="struct foo::MyBox">MyBox</a><<a class="primitive" href="{{channel}}/core/primitive.slice.html">[</a><a class="primitive" href="{{channel}}/core/primitive.u32.html">u32</a><a class="primitive" href="{{channel}}/core/primitive.slice.html">]</a>></code> \ No newline at end of file diff --git a/src/test/rustdoc/slice-links.link_slice_generic.html b/src/test/rustdoc/slice-links.link_slice_generic.html new file mode 100644 index 00000000000..fe79ca7a82d --- /dev/null +++ b/src/test/rustdoc/slice-links.link_slice_generic.html @@ -0,0 +1 @@ +<code>pub fn beta<T>() -> <a class="primitive" href="{{channel}}/core/primitive.slice.html">&'static [T]</a></code> \ No newline at end of file diff --git a/src/test/rustdoc/slice-links.link_slice_u32.html b/src/test/rustdoc/slice-links.link_slice_u32.html new file mode 100644 index 00000000000..c7e430b0607 --- /dev/null +++ b/src/test/rustdoc/slice-links.link_slice_u32.html @@ -0,0 +1 @@ +<code>pub fn alpha() -> <a class="primitive" href="{{channel}}/core/primitive.slice.html">&'static [</a><a class="primitive" href="{{channel}}/core/primitive.u32.html">u32</a><a class="primitive" href="{{channel}}/core/primitive.slice.html">]</a></code> \ No newline at end of file diff --git a/src/test/rustdoc/slice-links.rs b/src/test/rustdoc/slice-links.rs new file mode 100644 index 00000000000..9a78e963e30 --- /dev/null +++ b/src/test/rustdoc/slice-links.rs @@ -0,0 +1,28 @@ +#![crate_name = "foo"] +#![no_std] + +pub struct MyBox<T: ?Sized>(*const T); + +// @has 'foo/fn.alpha.html' +// @snapshot link_slice_u32 - '//pre[@class="rust fn"]/code' +pub fn alpha() -> &'static [u32] { + loop {} +} + +// @has 'foo/fn.beta.html' +// @snapshot link_slice_generic - '//pre[@class="rust fn"]/code' +pub fn beta<T>() -> &'static [T] { + loop {} +} + +// @has 'foo/fn.gamma.html' +// @snapshot link_box_u32 - '//pre[@class="rust fn"]/code' +pub fn gamma() -> MyBox<[u32]> { + loop {} +} + +// @has 'foo/fn.delta.html' +// @snapshot link_box_generic - '//pre[@class="rust fn"]/code' +pub fn delta<T>() -> MyBox<[T]> { + loop {} +} |
