File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -134,3 +134,53 @@ fn tuples_are_copy() {
134134 }
135135 }
136136}
137+
138+ #[ test]
139+ fn tuples_are_clone ( ) {
140+ test ! {
141+ program {
142+ #[ lang( clone) ]
143+ trait Clone { }
144+
145+ trait Foo { }
146+
147+ impl Clone for u8 { }
148+ }
149+
150+ goal {
151+ ( dyn Foo , ) : Clone
152+ } yields {
153+ "No possible solution"
154+ }
155+
156+ goal {
157+ ( u8 , dyn Foo ) : Clone
158+ } yields {
159+ "No possible solution"
160+ }
161+
162+ goal {
163+ ( dyn Foo , u8 ) : Clone
164+ } yields {
165+ "No possible solution"
166+ }
167+
168+ goal {
169+ ( ) : Clone
170+ } yields {
171+ "Unique; substitution [], lifetime constraints []"
172+ }
173+
174+ goal {
175+ ( u8 , ) : Clone
176+ } yields {
177+ "Unique; substitution [], lifetime constraints []"
178+ }
179+
180+ goal {
181+ ( u8 , u8 ) : Clone
182+ } yields {
183+ "Unique; substitution [], lifetime constraints []"
184+ }
185+ }
186+ }
You can’t perform that action at this time.
0 commit comments