]> git.proxmox.com Git - rustc.git/blame - tests/rustdoc/array-links.rs
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / rustdoc / array-links.rs
CommitLineData
2b03887a
FG
1#![crate_name = "foo"]
2#![no_std]
3
4pub struct MyBox<T: ?Sized>(*const T);
5
6// @has 'foo/fn.alpha.html'
9ffffee4 7// @snapshot link_slice_u32 - '//pre[@class="rust item-decl"]/code'
2b03887a
FG
8pub fn alpha() -> &'static [u32; 1] {
9 loop {}
10}
11
12// @has 'foo/fn.beta.html'
9ffffee4 13// @snapshot link_slice_generic - '//pre[@class="rust item-decl"]/code'
2b03887a
FG
14pub fn beta<T>() -> &'static [T; 1] {
15 loop {}
16}
17
18// @has 'foo/fn.gamma.html'
9ffffee4 19// @snapshot link_box_u32 - '//pre[@class="rust item-decl"]/code'
2b03887a
FG
20pub fn gamma() -> MyBox<[u32; 1]> {
21 loop {}
22}
23
24// @has 'foo/fn.delta.html'
9ffffee4 25// @snapshot link_box_generic - '//pre[@class="rust item-decl"]/code'
2b03887a
FG
26pub fn delta<T>() -> MyBox<[T; 1]> {
27 loop {}
28}