4 // @has foo/index.html '//a/@href' 'struct.Foo.html#method.new'
5 // @has foo/struct.Foo.html '//a/@href' 'struct.Foo.html#method.new'
7 /// Use [`new`] to create a new instance.
13 pub fn new() -> Self {
18 // @has foo/index.html '//a/@href' 'struct.Bar.html#method.new2'
19 // @has foo/struct.Bar.html '//a/@href' 'struct.Bar.html#method.new2'
21 /// Use [`new2`] to create a new instance.
23 /// [`new2`]: Self::new2
27 pub fn new2() -> Self {
33 // @has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#structfield.struct_field'
37 /// [`struct_field`]: Self::struct_field
42 // @has foo/enum.MyEnum.html '//a/@href' 'enum.MyEnum.html#variant.EnumVariant'
46 /// [`EnumVariant`]: Self::EnumVariant
51 // @has foo/union.MyUnion.html '//a/@href' 'union.MyUnion.html#structfield.union_field'
55 /// [`union_field`]: Self::union_field
60 // @has foo/trait.MyTrait.html '//a/@href' 'trait.MyTrait.html#associatedtype.AssoType'
64 /// [`AssoType`]: Self::AssoType
67 // @has foo/trait.MyTrait.html '//a/@href' 'trait.MyTrait.html#associatedconstant.ASSO_CONST'
71 /// [`ASSO_CONST`]: Self::ASSO_CONST
72 const ASSO_CONST: i32 = 1;
74 // @has foo/trait.MyTrait.html '//a/@href' 'trait.MyTrait.html#method.asso_fn'
78 /// [`asso_fn`]: Self::asso_fn
83 // @has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#method.for_impl'
87 /// [`for_impl`]: Self::for_impl
93 impl MyTrait for MyStruct {
94 // @has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#associatedtype.AssoType'
98 /// [`AssoType`]: Self::AssoType
101 // @has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#associatedconstant.ASSO_CONST'
105 /// [`ASSO_CONST`]: Self::ASSO_CONST
106 const ASSO_CONST: i32 = 10;
108 // @has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#method.asso_fn'
112 /// [`asso_fn`]: Self::asso_fn