]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/array-links.rs
Re-add #[allow(unused)] attr
[rust.git] / tests / rustdoc / array-links.rs
1 #![crate_name = "foo"]
2 #![no_std]
3
4 pub struct MyBox<T: ?Sized>(*const T);
5
6 // @has 'foo/fn.alpha.html'
7 // @snapshot link_slice_u32 - '//pre[@class="rust fn"]/code'
8 pub fn alpha() -> &'static [u32; 1] {
9     loop {}
10 }
11
12 // @has 'foo/fn.beta.html'
13 // @snapshot link_slice_generic - '//pre[@class="rust fn"]/code'
14 pub fn beta<T>() -> &'static [T; 1] {
15     loop {}
16 }
17
18 // @has 'foo/fn.gamma.html'
19 // @snapshot link_box_u32 - '//pre[@class="rust fn"]/code'
20 pub fn gamma() -> MyBox<[u32; 1]> {
21     loop {}
22 }
23
24 // @has 'foo/fn.delta.html'
25 // @snapshot link_box_generic - '//pre[@class="rust fn"]/code'
26 pub fn delta<T>() -> MyBox<[T; 1]> {
27     loop {}
28 }