Skip to content

Commit 1627b6e

Browse files
Bless tests
1 parent f0579eb commit 1627b6e

25 files changed

+295
-447
lines changed

tests/test/auto_traits.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn auto_semantics() {
4848
T: Send
4949
}
5050
} yields {
51-
expect![["Ambiguous"]]
51+
expect![["Ambiguous; no inference guidance"]]
5252
}
5353
}
5454
}
@@ -201,7 +201,7 @@ fn enum_auto_trait() {
201201
goal {
202202
A: Send
203203
} yields {
204-
expect![["Unique; substitution [], lifetime constraints []"]]
204+
expect![["Unique"]]
205205
}
206206

207207
goal {
@@ -239,46 +239,46 @@ fn builtin_auto_trait() {
239239

240240
// The following types only contain AutoTrait-types, and thus implement AutoTrait themselves.
241241
goal { (i32, f32): AutoTrait }
242-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
242+
yields { expect![["Unique"]] }
243243

244244
goal { [(); 1]: AutoTrait }
245-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
245+
yields { expect![["Unique"]] }
246246

247247
goal { [()]: AutoTrait }
248-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
248+
yields { expect![["Unique"]] }
249249

250250
goal { u32: AutoTrait }
251-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
251+
yields { expect![["Unique"]] }
252252

253253
goal { *const (): AutoTrait }
254-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
254+
yields { expect![["Unique"]] }
255255

256256
goal { *mut (): AutoTrait }
257-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
257+
yields { expect![["Unique"]] }
258258

259259
goal { forall<'a> { &'a (): AutoTrait } }
260-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
260+
yields { expect![["Unique"]] }
261261

262262
goal { forall<'a> { &'a mut (): AutoTrait } }
263-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
263+
yields { expect![["Unique"]] }
264264

265265
goal { str: AutoTrait }
266-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
266+
yields { expect![["Unique"]] }
267267

268268
goal { !: AutoTrait }
269-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
269+
yields { expect![["Unique"]] }
270270

271271
goal { Enum: AutoTrait }
272-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
272+
yields { expect![["Unique"]] }
273273

274274
goal { func: AutoTrait }
275-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
275+
yields { expect![["Unique"]] }
276276

277277
goal { good_closure: AutoTrait }
278-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
278+
yields { expect![["Unique"]] }
279279

280280
goal { fn(Marker) -> Marker: AutoTrait }
281-
yields { expect![["Unique; substitution [], lifetime constraints []"]] }
281+
yields { expect![["Unique"]] }
282282

283283

284284
// foreign types do not implement AutoTraits automatically
@@ -317,7 +317,7 @@ fn adt_auto_trait() {
317317
Yes: AutoTrait
318318
}
319319
yields {
320-
expect![["Unique; substitution [], lifetime constraints []"]]
320+
expect![["Unique"]]
321321
}
322322

323323
goal {
@@ -331,7 +331,7 @@ fn adt_auto_trait() {
331331
X: AutoTrait
332332
}
333333
yields {
334-
expect![["Unique; substitution [], lifetime constraints []"]]
334+
expect![["Unique"]]
335335
}
336336

337337
goal {

tests/test/coherence_goals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn fundamental_types() {
132132

133133
// With fundamental, Box can be local for certain types, so there is no unique solution
134134
// anymore for any of these
135-
goal { forall<T> { not { IsLocal(Box<T>) } } } yields { expect![["Ambiguous"]] }
135+
goal { forall<T> { not { IsLocal(Box<T>) } } } yields { expect![["Ambiguous; no inference guidance"]] }
136136
goal { forall<T> { IsLocal(Box<T>) } } yields { expect![["No possible solution"]] }
137137
goal { forall<T> { IsUpstream(Box<T>) } } yields { expect![["No possible solution"]] }
138138

tests/test/coinduction.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fn coinductive_trivial_variant1() {
126126
goal {
127127
exists<T, U> { T: C1<U> }
128128
} yields {
129-
expect![["Unique; substitution [?0 := X, ?1 := X], lifetime constraints []"]]
129+
expect![["Unique; substitution [?0 := X, ?1 := X]"]]
130130
}
131131
}
132132
}
@@ -150,7 +150,7 @@ fn coinductive_trivial_variant2() {
150150
goal {
151151
exists<T, U> { T: C1<U> }
152152
} yields {
153-
expect![["Unique; substitution [?0 := X, ?1 := X], lifetime constraints []"]]
153+
expect![["Unique; substitution [?0 := X, ?1 := X]"]]
154154
}
155155
}
156156
}
@@ -168,7 +168,7 @@ fn coinductive_trivial_variant3() {
168168
goal {
169169
exists<T, U> { T: C1<U> }
170170
} yields {
171-
expect![["Unique; for<?U0,?U0> { substitution [?0 := ^0.0, ?1 := ^0.1], lifetime constraints [] }"]]
171+
expect![["Unique; for<?U0,?U0> { substitution [?0 := ^0.0, ?1 := ^0.1] }"]]
172172
}
173173
}
174174
}
@@ -494,7 +494,7 @@ fn coinductive_multicycle1() {
494494
goal {
495495
forall<X> { X: Any }
496496
} yields {
497-
expect![["Unique; substitution [], lifetime constraints []"]]
497+
expect![["Unique"]]
498498
}
499499
}
500500
}
@@ -534,7 +534,7 @@ fn coinductive_multicycle2() {
534534
goal {
535535
forall<X> { X: Any }
536536
} yields {
537-
expect![["Unique; substitution [], lifetime constraints []"]]
537+
expect![["Unique"]]
538538
}
539539
}
540540
}

tests/test/constants.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn single_impl() {
1818
S<N>: Trait
1919
}
2020
} yields {
21-
expect![["Unique; substitution [?0 := 3], lifetime constraints []"]]
21+
expect![["Unique; substitution [?0 := 3]"]]
2222
}
2323

2424
goal {
@@ -92,15 +92,15 @@ fn generic_impl() {
9292
S<N>: Trait
9393
}
9494
} yields {
95-
expect![["Unique; for<?U0> { substitution [?0 := ^0.0], lifetime constraints [] }"]]
95+
expect![["Unique; for<?U0> { substitution [?0 := ^0.0] }"]]
9696
}
9797

9898
goal {
9999
forall<const N> {
100100
S<N>: Trait
101101
}
102102
} yields {
103-
expect![["Unique; substitution [], lifetime constraints []"]]
103+
expect![["Unique"]]
104104
}
105105
}
106106
}
@@ -133,7 +133,7 @@ fn placeholders_eq() {
133133
}
134134
}
135135
} yields {
136-
expect![["Unique; substitution [?0 := !1_0], lifetime constraints []"]]
136+
expect![["Unique; substitution [?0 := !1_0]"]]
137137
}
138138

139139
goal {

tests/test/cycle.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn inner_cycle() {
3131
goal {
3232
exists<T> { T: A }
3333
} yields {
34-
expect![["Ambiguous"]]
34+
expect![["Ambiguous; no inference guidance"]]
3535
}
3636
}
3737
}
@@ -141,7 +141,7 @@ fn multiple_ambiguous_cycles() {
141141
T: WF
142142
}
143143
} yields {
144-
expect![["Ambig"]]
144+
expect![["Ambiguous; no inference guidance"]]
145145
}
146146
}
147147
}

tests/test/discriminant_kind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ fn discriminant_kind_assoc() {
160160
}
161161
}
162162
} yields {
163-
expect![["Ambiguous"]]
163+
expect![["Ambiguous; no inference guidance"]]
164164
}
165165
}
166166
}

tests/test/existential_types.rs

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn dyn_Clone_is_Clone() {
1414
dyn Clone + 's: Clone
1515
}
1616
} yields {
17-
expect![["Unique; substitution []"]]
17+
expect![["Unique"]]
1818
}
1919
}
2020
}
@@ -50,7 +50,7 @@ fn dyn_Clone_Send_is_Send() {
5050
(dyn Clone + Send + 's): Send
5151
}
5252
} yields {
53-
expect![["Unique; substitution []"]]
53+
expect![["Unique"]]
5454
}
5555
}
5656
}
@@ -80,7 +80,7 @@ fn dyn_Foo_Bar() {
8080
}
8181
}
8282
} yields {
83-
expect![["Unique; substitution [?0 := Bar], lifetime constraints []"]]
83+
expect![["Unique; substitution [?0 := Bar]"]]
8484
}
8585
}
8686
}
@@ -127,7 +127,7 @@ fn dyn_super_trait_simple() {
127127
}
128128
}
129129
} yields {
130-
expect![["Unique; substitution [?0 := B], lifetime constraints []"]]
130+
expect![["Unique; substitution [?0 := B]"]]
131131
}
132132
}
133133
}
@@ -279,23 +279,23 @@ fn dyn_higher_ranked_type_arguments() {
279279
dyn forall<'a> Foo<Ref<'a>> + 's: Foo<Ref<'s>>
280280
}
281281
} yields {
282-
expect![["Unique; substitution [], lifetime constraints []"]]
282+
expect![["Unique"]]
283283
}
284284

285285
goal {
286286
forall<'s> {
287287
dyn forall<'a> Foo<Ref<'a>> + Bar + 's: Foo<Ref<'s>>
288288
}
289289
} yields {
290-
expect![["Unique; substitution [], lifetime constraints []"]]
290+
expect![["Unique"]]
291291
}
292292

293293
goal {
294294
forall<'s> {
295295
dyn forall<'a> Foo<Ref<'a>> + Bar + 's: Bar
296296
}
297297
} yields {
298-
expect![["Unique; substitution [], lifetime constraints []"]]
298+
expect![["Unique"]]
299299
}
300300

301301
goal {
@@ -306,10 +306,7 @@ fn dyn_higher_ranked_type_arguments() {
306306
}
307307
} yields {
308308
// Note that this requires 'a == 's, so it would be resolveable later on.
309-
expect![["Unique; substitution [], lifetime constraints [\
310-
InEnvironment { environment: Env([]), goal: '!1_0: '!2_0 }, \
311-
InEnvironment { environment: Env([]), goal: '!2_0: '!1_0 }\
312-
]"]]
309+
expect![["Unique; lifetime constraints [InEnvironment { environment: Env([]), goal: '!1_0: '!2_0 }, InEnvironment { environment: Env([]), goal: '!2_0: '!1_0 }]"]]
313310
}
314311
}
315312
}
@@ -336,10 +333,7 @@ fn dyn_binders_reverse() {
336333
>
337334
}
338335
} yields {
339-
expect![["Unique; substitution [], lifetime constraints [\
340-
InEnvironment { environment: Env([]), goal: '!5_0: '!5_1 }, \
341-
InEnvironment { environment: Env([]), goal: '!5_1: '!5_0 }\
342-
]"]]
336+
expect![["Unique; lifetime constraints [InEnvironment { environment: Env([]), goal: '!5_0: '!5_1 }, InEnvironment { environment: Env([]), goal: '!5_1: '!5_0 }]"]]
343337
}
344338

345339
// Note: these constraints are ultimately unresolveable (we
@@ -351,10 +345,7 @@ fn dyn_binders_reverse() {
351345
>
352346
}
353347
} yields {
354-
expect![["Unique; substitution [], lifetime constraints [\
355-
InEnvironment { environment: Env([]), goal: '!3_0: '!3_1 }, \
356-
InEnvironment { environment: Env([]), goal: '!3_1: '!3_0 }\
357-
]"]]
348+
expect![["Unique; lifetime constraints [InEnvironment { environment: Env([]), goal: '!3_0: '!3_1 }, InEnvironment { environment: Env([]), goal: '!3_1: '!3_0 }]"]]
358349
}
359350

360351
// Note: ordering of parameters is reversed here, but that's no problem
@@ -365,7 +356,7 @@ fn dyn_binders_reverse() {
365356
>
366357
}
367358
} yields {
368-
expect![["Unique; substitution [], lifetime constraints []"]]
359+
expect![["Unique"]]
369360
}
370361
}
371362
}
@@ -388,10 +379,7 @@ fn dyn_lifetime_bound() {
388379
}
389380
}
390381
} yields {
391-
expect![["Unique; substitution [], lifetime constraints [\
392-
InEnvironment { environment: Env([]), goal: '!1_0: '!2_0 }, \
393-
InEnvironment { environment: Env([]), goal: '!2_0: '!1_0 }\
394-
]"]]
382+
expect![["Unique; lifetime constraints [InEnvironment { environment: Env([]), goal: '!1_0: '!2_0 }, InEnvironment { environment: Env([]), goal: '!2_0: '!1_0 }]"]]
395383
}
396384
}
397385
}
@@ -410,10 +398,10 @@ fn dyn_associated_type_binding() {
410398
}
411399
}
412400
} yields[SolverChoice::recursive_default()] {
413-
expect![["Unique; substitution [?0 := Int(I32)], lifetime constraints []"]]
401+
expect![["Unique; substitution [?0 := Int(I32)]"]]
414402
} yields[SolverChoice::slg_default()] {
415403
// #234
416-
expect![["Ambiguous"]]
404+
expect![["Ambiguous; no inference guidance"]]
417405
}
418406
}
419407
}
@@ -430,7 +418,7 @@ fn dyn_well_formed() {
430418
WellFormed(dyn MyTrait + 's)
431419
}
432420
} yields {
433-
expect![["Unique"]]
421+
expect![["Unique; for<?U0> { substitution [?0 := '^0.0] }"]]
434422
}
435423
}
436424
}

tests/test/fn_def.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ fn generic_fn_implements_fn_traits() {
144144
goal {
145145
exists<T> { foo<T>: Fn<(T,)> }
146146
} yields {
147-
expect![["Unique"]]
147+
expect![["Unique; for<?U0> { substitution [?0 := ^0.0] }"]]
148148
}
149149

150150
goal {
@@ -156,7 +156,7 @@ fn generic_fn_implements_fn_traits() {
156156
goal {
157157
exists<T> { Normalize(<foo<T> as FnOnce<(T,)>>::Output -> T) }
158158
} yields {
159-
expect![["Unique"]]
159+
expect![["Unique; for<?U0> { substitution [?0 := ^0.0] }"]]
160160
}
161161

162162
goal {

0 commit comments

Comments
 (0)