1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![feature(associated_type_defaults)]
16 /// docs for PrivateConst
17 const PrivateConst: i8 = -123;
18 /// docs for PublicConst
19 pub const PublicConst: u8 = 123;
20 /// docs for private_method
21 fn private_method() {}
22 /// docs for public_method
23 pub fn public_method() {}
27 /// docs for ConstNoDefault
28 const ConstNoDefault: i16;
29 /// docs for ConstWithDefault
30 const ConstWithDefault: u16 = 12345;
31 /// docs for TypeNoDefault
33 /// docs for TypeWithDefault
34 type TypeWithDefault = u32;
35 /// docs for method_no_default
36 fn method_no_default();
37 /// docs for method_with_default
38 fn method_with_default() {}
41 impl MyTrait for MyStruct {
42 /// dox for ConstNoDefault
43 const ConstNoDefault: i16 = -12345;
44 /// dox for TypeNoDefault
45 type TypeNoDefault = i32;
46 /// dox for method_no_default
47 fn method_no_default() {}