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