Rollup merge of #97668 - notriddle:notriddle/slice-link, r=jsha
rustdoc: clean up primitive.slice.html links Before: <a href="https://doc.rust-lang.org/stable/std/boxed/struct.Box.html">Box</a><<a href="https://doc.rust-lang.org/stable/std/primitive.slice.html">[</a>T<a href="https://doc.rust-lang.org/stable/std/primitive.slice.html">]</a>> After: <a href="https://doc.rust-lang.org/stable/std/boxed/struct.Box.html">Box</a><<a href="https://doc.rust-lang.org/stable/std/primitive.slice.html">[T]</a>>
This commit is contained in:
commit
d6f35b3454
7 changed files with 50 additions and 22 deletions
1
src/test/rustdoc/slice-links.link_box_generic.html
Normal file
1
src/test/rustdoc/slice-links.link_box_generic.html
Normal file
|
|
@ -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>
|
||||
1
src/test/rustdoc/slice-links.link_box_u32.html
Normal file
1
src/test/rustdoc/slice-links.link_box_u32.html
Normal file
|
|
@ -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>
|
||||
1
src/test/rustdoc/slice-links.link_slice_generic.html
Normal file
1
src/test/rustdoc/slice-links.link_slice_generic.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<code>pub fn beta<T>() -> <a class="primitive" href="{{channel}}/core/primitive.slice.html">&'static [T]</a></code>
|
||||
1
src/test/rustdoc/slice-links.link_slice_u32.html
Normal file
1
src/test/rustdoc/slice-links.link_slice_u32.html
Normal file
|
|
@ -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>
|
||||
28
src/test/rustdoc/slice-links.rs
Normal file
28
src/test/rustdoc/slice-links.rs
Normal file
|
|
@ -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 {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue