-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>>
- Loading branch information
Showing
7 changed files
with
50 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<code>pub fn beta<T>() -> <a class="primitive" href="{{channel}}/core/primitive.slice.html">&'static [T]</a></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 {} | ||
} |