]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/inline_cross/auxiliary/assoc-items.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / rustdoc / inline_cross / auxiliary / assoc-items.rs
1 #![feature(associated_type_defaults)]
2
3 pub struct MyStruct;
4
5 impl MyStruct {
6     /// docs for PrivateConst
7     const PrivateConst: i8 = -123;
8     /// docs for PublicConst
9     pub const PublicConst: u8 = 123;
10     /// docs for private_method
11     fn private_method() {}
12     /// docs for public_method
13     pub fn public_method() {}
14 }
15
16 pub trait MyTrait {
17     /// docs for ConstNoDefault
18     const ConstNoDefault: i16;
19     /// docs for ConstWithDefault
20     const ConstWithDefault: u16 = 12345;
21     /// docs for TypeNoDefault
22     type TypeNoDefault;
23     /// docs for TypeWithDefault
24     type TypeWithDefault = u32;
25     /// docs for method_no_default
26     fn method_no_default();
27     /// docs for method_with_default
28     fn method_with_default() {}
29 }
30
31 impl MyTrait for MyStruct {
32     /// dox for ConstNoDefault
33     const ConstNoDefault: i16 = -12345;
34     /// dox for TypeNoDefault
35     type TypeNoDefault = i32;
36     /// dox for method_no_default
37     fn method_no_default() {}
38 }