Skip to content

Commit 529fea5

Browse files
Bless updated tests
We no longer rely on suffix matching,
1 parent edca2ac commit 529fea5

28 files changed

+366
-463
lines changed

tests/test/arrays.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn arrays_are_sized() {
1313
[u32; N]: Sized
1414
}
1515
} yields {
16-
expect![["Unique"]]
16+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
1717
}
1818

1919
}
@@ -35,7 +35,7 @@ fn arrays_are_copy_if_element_copy() {
3535
[Foo; N]: Copy
3636
}
3737
} yields {
38-
expect![["Unique"]]
38+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
3939
}
4040
}
4141
}
@@ -76,7 +76,7 @@ fn arrays_are_clone_if_element_clone() {
7676
[Foo; N]: Clone
7777
}
7878
} yields {
79-
expect![["Unique"]]
79+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
8080
}
8181
}
8282
}
@@ -116,7 +116,7 @@ fn arrays_are_well_formed_if_elem_sized() {
116116
}
117117
}
118118
} yields {
119-
expect![["Unique"]]
119+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
120120
}
121121

122122
goal {

tests/test/auto_traits.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ fn auto_semantics() {
3434
}
3535
}
3636
} yields {
37-
expect![["Unique"]]
37+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
3838
}
3939

4040
goal {
4141
List<TypeA>: Send
4242
} yields {
43-
expect![["Unique"]]
43+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
4444
}
4545

4646
goal {
4747
exists<T> {
4848
T: Send
4949
}
5050
} yields {
51-
expect![["Ambiguous"]]
51+
expect![[r#"Ambiguous; no inference guidance"#]]
5252
}
5353
}
5454
}
@@ -71,7 +71,7 @@ fn auto_trait_without_impls() {
7171
goal {
7272
TypeA: Send
7373
} yields {
74-
expect![["Unique"]]
74+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
7575
}
7676

7777
// No fields so `Useless<T>` is `Send`.
@@ -80,7 +80,7 @@ fn auto_trait_without_impls() {
8080
Useless<T>: Send
8181
}
8282
} yields {
83-
expect![["Unique"]]
83+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
8484
}
8585

8686
goal {
@@ -90,7 +90,7 @@ fn auto_trait_without_impls() {
9090
}
9191
}
9292
} yields {
93-
expect![["Unique"]]
93+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
9494
}
9595
}
9696
}
@@ -118,7 +118,7 @@ fn auto_trait_with_impls() {
118118
goal {
119119
TypeB: Send
120120
} yields {
121-
expect![["Unique"]]
121+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
122122
}
123123

124124
goal {
@@ -130,7 +130,7 @@ fn auto_trait_with_impls() {
130130
goal {
131131
Vec<TypeB>: Send
132132
} yields {
133-
expect![["Unique"]]
133+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
134134
}
135135

136136
goal {

tests/test/closures.rs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ fn closure_is_well_formed() {
1212
goal {
1313
WellFormed(foo)
1414
} yields {
15-
expect![["Unique"]]
15+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
1616
}
1717
goal {
1818
WellFormed(bar)
1919
} yields {
20-
expect![["Unique"]]
20+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
2121
}
2222
goal {
2323
WellFormed(baz)
2424
} yields {
25-
expect![["Unique"]]
25+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
2626
}
2727
}
2828
}
@@ -40,7 +40,7 @@ fn closure_is_sized() {
4040
goal {
4141
foo: Sized
4242
} yields {
43-
expect![["Unique"]]
43+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
4444
}
4545
}
4646
}
@@ -76,17 +76,17 @@ fn closure_is_copy() {
7676
goal {
7777
foo: Copy
7878
} yields {
79-
expect![["Unique"]]
79+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
8080
}
8181
goal {
8282
bar: Copy
8383
} yields {
84-
expect![["Unique"]]
84+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
8585
}
8686
goal {
8787
baz: Copy
8888
} yields {
89-
expect![["Unique"]]
89+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
9090
}
9191

9292
// A closure with non-Copy upvars is not copy
@@ -103,7 +103,7 @@ fn closure_is_copy() {
103103
foobar<'a>: Copy
104104
}
105105
} yields {
106-
expect![["Unique"]]
106+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
107107
}
108108
goal {
109109
forall<T> { with_ty<T>: Copy }
@@ -113,7 +113,7 @@ fn closure_is_copy() {
113113
goal {
114114
forall<T> { if (T: Copy) { with_ty<T>: Copy } }
115115
} yields {
116-
expect![["Unique"]]
116+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
117117
}
118118
}
119119
}
@@ -132,17 +132,17 @@ fn closure_is_clone() {
132132
goal {
133133
foo: Clone
134134
} yields {
135-
expect![["Unique"]]
135+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
136136
}
137137
goal {
138138
bar: Clone
139139
} yields {
140-
expect![["Unique"]]
140+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
141141
}
142142
goal {
143143
baz: Clone
144144
} yields {
145-
expect![["Unique"]]
145+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
146146
}
147147
}
148148
}
@@ -191,34 +191,34 @@ fn closure_implements_fn_traits() {
191191
goal {
192192
foo: FnOnce<()>
193193
} yields {
194-
expect![["Unique"]]
194+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
195195
}
196196
goal {
197197
Normalize(<foo as FnOnce<()>>::Output -> ())
198198
} yields {
199-
expect![["Unique"]]
199+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
200200
}
201201

202202
// A closure with kind `Fn` implements all `Fn` traits
203203
goal {
204204
bar: Fn<()>
205205
} yields {
206-
expect![["Unique"]]
206+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
207207
}
208208
goal {
209209
bar: FnMut<()>
210210
} yields {
211-
expect![["Unique"]]
211+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
212212
}
213213
goal {
214214
bar: FnOnce<()>
215215
} yields {
216-
expect![["Unique"]]
216+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
217217
}
218218
goal {
219219
Normalize(<bar as FnOnce<()>>::Output -> ())
220220
} yields {
221-
expect![["Unique"]]
221+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
222222
}
223223

224224
// A closure with kind `FnMut` implements `FnMut` and `FnOnce`
@@ -230,53 +230,53 @@ fn closure_implements_fn_traits() {
230230
goal {
231231
baz: FnMut<()>
232232
} yields {
233-
expect![["Unique"]]
233+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
234234
}
235235
goal {
236236
baz: FnOnce<()>
237237
} yields {
238-
expect![["Unique"]]
238+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
239239
}
240240
goal {
241241
Normalize(<baz as FnOnce<()>>::Output -> ())
242242
} yields {
243-
expect![["Unique"]]
243+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
244244
}
245245
// A closure also implements the `Fn` traits regardless of upvars
246246
goal {
247247
forall<'a> {
248248
foobar<'a>: FnOnce<(u8, f32)>
249249
}
250250
} yields {
251-
expect![["Unique"]]
251+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
252252
}
253253
goal {
254254
forall<'a> {
255255
Normalize(<foobar<'a> as FnOnce<(u8, f32)>>::Output -> u32)
256256
}
257257
} yields {
258-
expect![["Unique"]]
258+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
259259
}
260260
goal {
261261
forall<'a> {
262262
Normalize(<foobar<'a> as FnOnce<(u8, f32)>>::Output -> u32)
263263
}
264264
} yields {
265-
expect![["Unique"]]
265+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
266266
}
267267
goal {
268268
forall<'a> {
269269
foobuzz<'a>: FnOnce<(u8, f32)>
270270
}
271271
} yields {
272-
expect![["Unique"]]
272+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
273273
}
274274
goal {
275275
forall<'a> {
276276
Normalize(<foobuzz<'a> as FnOnce<(u8, f32)>>::Output -> u32)
277277
}
278278
} yields {
279-
expect![["Unique"]]
279+
expect![[r#"Unique; substitution [], lifetime constraints []"#]]
280280
}
281281
}
282282
}

0 commit comments

Comments
 (0)