Skip to content

Commit 0b8da85

Browse files
super-tupledaboross
authored andcommitted
Fix incorrect test cases
These are just a few test cases not tested. Co-authored-by: David Ross <daboross@daboross.net>
1 parent 599742b commit 0b8da85

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

tests/test/subtype.rs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,18 @@ fn multi_lifetime_invariant_struct() {
235235
Subtype(Foo<&'b u32>, Foo<U>)
236236
}
237237
}
238-
} yields {
238+
} yields[SolverChoice::recursive()] {
239239
// Because A is invariant, we require the lifetimes to be equal
240-
"Unique; substitution [?0 := (&'!1_1 Uint(U32))], lifetime
241-
constraints [InEnvironment { environment: Env([]), goal: '!1_0: '!1_1 }, \
242-
InEnvironment { environment: Env([]), goal: '!1_1: '!1_0 }]"
240+
"Unique; substitution [?0 := (&'!1_0 Uint(U32))], lifetime constraints [\
241+
InEnvironment { environment: Env([]), goal: '!1_0: '!1_1 }, \
242+
InEnvironment { environment: Env([]), goal: '!1_1: '!1_0 } \
243+
]"
244+
} yields[SolverChoice::slg_default()] {
245+
// Because A is invariant, we require the lifetimes to be equal
246+
"Unique; substitution [?0 := (&'!1_1 Uint(U32))], lifetime constraints [\
247+
InEnvironment { environment: Env([]), goal: '!1_0: '!1_1 }, \
248+
InEnvironment { environment: Env([]), goal: '!1_1: '!1_0 } \
249+
]"
243250
}
244251
}
245252
}
@@ -277,8 +284,8 @@ fn multi_lifetime_tuple() {
277284
goal {
278285
forall<'a, 'b> {
279286
exists<U> {
280-
Subtype((&'a u32, &'a u32), [U]),
281-
Subtype((&'b u32, &'b u32), [U])
287+
Subtype((&'a u32,), (U,)),
288+
Subtype((&'b u32,), (U,))
282289
}
283290
}
284291
} yields {
@@ -300,8 +307,8 @@ fn multi_lifetime_array() {
300307
goal {
301308
forall<'a, 'b> {
302309
exists<U> {
303-
Subtype([&'a u32; 16], [U]),
304-
Subtype([&'b u32; 16], [U])
310+
Subtype([&'a u32; 16], [U; 16]),
311+
Subtype([&'b u32; 16], [U; 16])
305312
}
306313
}
307314
} yields {

0 commit comments

Comments
 (0)