33struct SomeStruct {
44 field1 : :: some_crate:: Thing ,
55 field2 : :: some_crate:: Thing ,
6- field1_enum : :: some_crate:: Thing ,
7- field2_enum : :: some_crate:: Thing ,
86
97 field3 : some_crate:: Thing ,
108 field4 : some_crate:: Thing ,
@@ -77,11 +75,9 @@ fn main() {
7775 let x13: & :: some_crate:: SomeType = :: some_crate:: SomeType :: default ( ) ;
7876 let x14: & :: some_crate:: SomeType = :: some_crate:: SomeType :: default ( ) ;
7977
80- let y = SomeStruct {
78+ let y_call = SomeStruct {
8179 field1 : :: some_crate:: Thing :: default ( ) ,
8280 field2 : :: some_crate:: Thing :: default ( ) ,
83- field1_enum : :: some_crate:: Thing :: Enum1 ,
84- field2_enum : :: some_crate:: Thing :: Enum1 ,
8581
8682 field3 : some_crate:: Thing :: default ( ) ,
8783 field4 : some_crate:: Thing :: default ( ) ,
@@ -98,10 +94,86 @@ fn main() {
9894 field13 : & :: some_crate:: Thing :: default ( ) ,
9995 field14 : & :: some_crate:: Thing :: default ( ) ,
10096 } ;
97+
98+ let y_method_call = SomeStruct {
99+ field1 : :: some_crate:: Thing :: Default . call ( ) ,
100+ field2 : :: some_crate:: Thing :: Default . call ( ) ,
101+
102+ ..y_call
103+ } ;
104+
105+ let y_binary = SomeStruct {
106+ field1 : :: some_crate:: Thing :: Default + 12 ,
107+ field2 : :: some_crate:: Thing :: Default + 12 ,
108+
109+ ..y_call
110+ } ;
111+
112+ let y_cast = SomeStruct {
113+ field1 : :: some_crate:: Thing :: Default as i32 ,
114+ field2 : :: some_crate:: Thing :: Default as i32 ,
115+
116+ ..y_call
117+ } ;
118+
119+ let y_type = SomeStruct {
120+ field7 : :: some_crate:: Thing :: Default ,
121+ field8 : :: some_crate:: Thing :: Default ,
122+
123+ ..y_call
124+ } ;
125+
126+ let y_field = SomeStruct {
127+ field1 : :: some_crate:: Thing :: Default . some_field ,
128+ field2 : :: some_crate:: Thing :: Default . some_field ,
129+
130+ ..y_call
131+ } ;
132+
133+ let y_index = SomeStruct {
134+ field1 : :: some_crate:: Thing :: Default [ 0 ] ,
135+ field2 : :: some_crate:: Thing :: Default [ 0 ] ,
136+
137+ ..y_call
138+ } ;
139+
140+ let y_range = SomeStruct {
141+ field1 : :: some_crate:: Thing :: DefaultStart ..12 ,
142+ field2 : :: some_crate:: Thing :: DefaultStart ..12 ,
143+
144+ ..y_call
145+ } ;
146+
147+ let y_path = SomeStruct {
148+ field1 : :: some_crate:: Thing :: Default ,
149+ field2 : :: some_crate:: Thing :: Default ,
150+
151+ ..y_call
152+ } ;
153+
154+ let y_mac_call = SomeStruct {
155+ field1 : :: some_crate:: macr!( ) ,
156+ field2 : :: some_crate:: macr!( ) ,
157+
158+ ..y_call
159+ } ;
160+
161+ let y_struct = SomeStruct {
162+ field1 : :: some_crate:: Thing :: SomeStruct {
163+ fieldA1 : 123 ,
164+ fieldA2 : 123 ,
165+ } ,
166+ field2 : :: some_crate:: Thing :: SomeStruct {
167+ fieldA1 : 123 ,
168+ fieldA2 : 123 ,
169+ } ,
170+
171+ ..y_call
172+ } ;
101173}
102174
103- fn func1 ( x:: : some_crate:: SomeType ) { }
104- fn func2 ( x:: : some_crate:: SomeType ) { }
175+ fn func1 ( x : :: some_crate:: SomeType ) { }
176+ fn func2 ( x : :: some_crate:: SomeType ) { }
105177fn func3 ( x : some_crate:: SomeType ) { }
106178fn func4 ( x : some_crate:: SomeType ) { }
107179fn func5 ( x : some_crate:: SomeType ) { }
@@ -114,3 +186,26 @@ fn func11(x:&::some_crate::SomeType) {}
114186fn func12 ( x : & :: some_crate:: SomeType ) { }
115187fn func13 ( x : & :: some_crate:: SomeType ) { }
116188fn func14 ( x : & :: some_crate:: SomeType ) { }
189+
190+ fn print_gen_with_where1 < T > ( item : T )
191+ where
192+ T : :: some_crate:: SomeTrait + Clone ,
193+ {
194+ println ! ( "{}" , item. to_string( ) ) ;
195+ }
196+
197+ fn print_gen_with_where2 < T > ( item : T )
198+ where
199+ T : SomeTrait + Clone ,
200+ {
201+ println ! ( "{}" , item. to_string( ) ) ;
202+ }
203+
204+ fn print_gen_with_where3 < T : :: some_crate:: SomeTrait + Clone > ( item : T ) {
205+ println ! ( "{}" , item. to_string( ) ) ;
206+ }
207+
208+ fn print_gen_with_where4 < T : some_crate:: SomeTrait + Clone > ( item : T ) {
209+ println ! ( "{}" , item. to_string( ) ) ;
210+ }
211+
0 commit comments