]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/intra-link-prim-self.rs
`#![feature(inline_const)]` is no longer incomplete
[rust.git] / src / test / rustdoc / intra-link-prim-self.rs
1 #![deny(broken_intra_doc_links)]
2 #![feature(lang_items)]
3 #![feature(no_core)]
4 #![no_core]
5
6 #[lang = "usize"]
7 /// [Self::f]
8 /// [Self::MAX]
9 // @has intra_link_prim_self/primitive.usize.html
10 // @has - '//a[@href="primitive.usize.html#method.f"]' 'Self::f'
11 // @has - '//a[@href="primitive.usize.html#associatedconstant.MAX"]' 'Self::MAX'
12 impl usize {
13     /// Some docs
14     pub fn f() {}
15
16     /// 10 and 2^32 are basically the same.
17     pub const MAX: usize = 10;
18
19     // FIXME(#8995) uncomment this when associated types in inherent impls are supported
20     // @ has - '//a[@href="{{channel}}/std/primitive.usize.html#associatedtype.ME"]' 'Self::ME'
21     // / [Self::ME]
22     //pub type ME = usize;
23 }
24
25 #[doc(primitive = "usize")]
26 /// This has some docs.
27 mod usize {}
28
29 /// [S::f]
30 /// [Self::f]
31 pub struct S;
32
33 impl S {
34     pub fn f() {}
35 }