Skip to content

Commit 8440ed8

Browse files
committed
update tests
1 parent 8157eee commit 8440ed8

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

src/test.rs

+25-25
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ fn normalize_basic() {
478478
}
479479
}
480480
} yields {
481-
"Unique; substitution [?0 := !1], lifetime constraints []"
481+
"Unique; substitution [?0 := !1_0], lifetime constraints []"
482482
}
483483

484484
goal {
@@ -508,7 +508,7 @@ fn normalize_basic() {
508508
}
509509
}
510510
} yields {
511-
"Unique; substitution [?0 := (Iterator::Item)<!1>]"
511+
"Unique; substitution [?0 := (Iterator::Item)<!1_0>]"
512512
}
513513

514514
goal {
@@ -520,7 +520,7 @@ fn normalize_basic() {
520520
}
521521
}
522522
} yields {
523-
"Unique; substitution [?0 := (Iterator::Item)<!1>]"
523+
"Unique; substitution [?0 := (Iterator::Item)<!1_0>]"
524524
}
525525

526526
goal {
@@ -583,7 +583,7 @@ fn normalize_gat1() {
583583
}
584584
}
585585
} yields {
586-
"Unique; substitution [?0 := Iter<'!2, !1>], lifetime constraints []"
586+
"Unique; substitution [?0 := Iter<'!2_0, !1_0>], lifetime constraints []"
587587
}
588588
}
589589
}
@@ -608,7 +608,7 @@ fn normalize_gat2() {
608608
}
609609
}
610610
} yields {
611-
"Unique; substitution [?0 := Span<'!1, !2>], lifetime constraints []"
611+
"Unique; substitution [?0 := Span<'!1_0, !1_1>], lifetime constraints []"
612612
}
613613

614614
goal {
@@ -666,7 +666,7 @@ fn normalize_gat_with_where_clause() {
666666
}
667667
}
668668
} yields {
669-
"Unique; substitution [?0 := Value<!1>]"
669+
"Unique; substitution [?0 := Value<!1_0>]"
670670
}
671671
}
672672
}
@@ -705,7 +705,7 @@ fn normalize_gat_with_where_clause2() {
705705
}
706706
}
707707
} yields {
708-
"Unique; substitution [?0 := !2]"
708+
"Unique; substitution [?0 := !1_1]"
709709
}
710710
}
711711
}
@@ -924,7 +924,7 @@ fn region_equality() {
924924
} yields {
925925
"Unique; substitution [],
926926
lifetime constraints \
927-
[InEnvironment { environment: Env([]), goal: '!2 == '!1 }]
927+
[InEnvironment { environment: Env([]), goal: '!1_1 == '!1_0 }]
928928
"
929929
}
930930

@@ -935,7 +935,7 @@ fn region_equality() {
935935
}
936936
}
937937
} yields {
938-
"Unique; substitution [?0 := '!1], lifetime constraints []"
938+
"Unique; substitution [?0 := '!1_0], lifetime constraints []"
939939
}
940940
}
941941
}
@@ -968,12 +968,12 @@ fn forall_equality() {
968968
// this is because the region constraints are unsolvable.
969969
//
970970
// Note that `?0` (in universe 2) must be equal to both
971-
// `!1` and `!2`, which of course it cannot be.
971+
// `!1_0` and `!1_1`, which of course it cannot be.
972972
for<'a, 'b> Ref<'a, Ref<'b, Ref<'a, Unit>>>: Eq<
973973
for<'c, 'd> Ref<'c, Ref<'d, Ref<'d, Unit>>>>
974974
} yields {
975975
"Unique; substitution [], lifetime constraints [
976-
InEnvironment { environment: Env([]), goal: '!2 == '!1 }
976+
InEnvironment { environment: Env([]), goal: '!1_1 == '!1_0 }
977977
]"
978978
}
979979
}
@@ -1187,7 +1187,7 @@ fn normalize_under_binder() {
11871187
}
11881188
}
11891189
} yields {
1190-
"Unique; substitution [?0 := Ref<'!1, I32>], lifetime constraints []"
1190+
"Unique; substitution [?0 := Ref<'!1_0, I32>], lifetime constraints []"
11911191
}
11921192

11931193
goal {
@@ -1199,7 +1199,7 @@ fn normalize_under_binder() {
11991199
} yields {
12001200
"Unique; for<?U0> { \
12011201
substitution [?0 := Ref<'?0, I32>], \
1202-
lifetime constraints [InEnvironment { environment: Env([]), goal: '?0 == '!1 }] \
1202+
lifetime constraints [InEnvironment { environment: Env([]), goal: '?0 == '!1_0 }] \
12031203
}"
12041204
}
12051205
}
@@ -1212,7 +1212,7 @@ fn unify_quantified_lifetimes() {
12121212
}
12131213

12141214
// Check that `'a` (here, `'?0`) is not unified
1215-
// with `'!1`, because they belong to incompatible
1215+
// with `'!1_0`, because they belong to incompatible
12161216
// universes.
12171217
goal {
12181218
exists<'a> {
@@ -1223,7 +1223,7 @@ fn unify_quantified_lifetimes() {
12231223
} yields {
12241224
"Unique; for<?U0> { \
12251225
substitution [?0 := '?0], \
1226-
lifetime constraints [InEnvironment { environment: Env([]), goal: '?0 == '!1 }] \
1226+
lifetime constraints [InEnvironment { environment: Env([]), goal: '?0 == '!1_0 }] \
12271227
}"
12281228
}
12291229

@@ -1239,8 +1239,8 @@ fn unify_quantified_lifetimes() {
12391239
}
12401240
} yields {
12411241
"Unique; for<?U0> { \
1242-
substitution [?0 := '?0, ?1 := '!1], \
1243-
lifetime constraints [InEnvironment { environment: Env([]), goal: '?0 == '!1 }] \
1242+
substitution [?0 := '?0, ?1 := '!1_0], \
1243+
lifetime constraints [InEnvironment { environment: Env([]), goal: '?0 == '!1_0 }] \
12441244
}"
12451245
}
12461246
}
@@ -1254,7 +1254,7 @@ fn equality_binder() {
12541254
}
12551255

12561256
// Check that `'a` (here, `'?0`) is not unified
1257-
// with `'!1`, because they belong to incompatible
1257+
// with `'!1_0`, because they belong to incompatible
12581258
// universes.
12591259
goal {
12601260
forall<T> {
@@ -1265,7 +1265,7 @@ fn equality_binder() {
12651265
} yields {
12661266
"Unique; for<?U1> { \
12671267
substitution [?0 := '?0], \
1268-
lifetime constraints [InEnvironment { environment: Env([]), goal: '!2 == '?0 }] \
1268+
lifetime constraints [InEnvironment { environment: Env([]), goal: '!2_0 == '?0 }] \
12691269
}"
12701270
}
12711271
}
@@ -2172,8 +2172,8 @@ fn overflow_universe() {
21722172
trait Bar { }
21732173

21742174
// When asked to solve X: Bar, we will produce a
2175-
// requirement to solve !1: Bar. And then when asked to
2176-
// solve that, we'll produce a requirement to solve !2:
2175+
// requirement to solve !1_0: Bar. And then when asked to
2176+
// solve that, we'll produce a requirement to solve !1_1:
21772177
// Bar. And so forth.
21782178
forall<X> { X: Bar if forall<Y> { Y: Bar } }
21792179
}
@@ -2183,7 +2183,7 @@ fn overflow_universe() {
21832183
} yields {
21842184
// The internal universe canonicalization in the on-demand/recursive
21852185
// solver means that when we are asked to solve (e.g.)
2186-
// `!2: Bar`, we rewrite that to `!1: Bar`, identifying a
2186+
// `!1_1: Bar`, we rewrite that to `!1_0: Bar`, identifying a
21872187
// cycle.
21882188
"No possible solution"
21892189
}
@@ -2270,9 +2270,9 @@ fn gat_unify_with_implied_wc() {
22702270
//
22712271
// The problem was that we wound up enumerating a goal like
22722272
//
2273-
// <?0 as SliceExt>::Item = !1
2273+
// <?0 as SliceExt>::Item = !1_0
22742274
//
2275-
// which meant "find me the types that normalize to `!1`". We had no
2275+
// which meant "find me the types that normalize to `!1_0`". We had no
22762276
// problem finding these types, but after the first such type, we had
22772277
// the only unique answer we would ever find, and we wanted to reach
22782278
// the point where we could say "no more answers", so we kept
@@ -2396,7 +2396,7 @@ fn quantified_types() {
23962396
} yields {
23972397
// Lifetime constraints are unsatisfiable
23982398
"Unique; substitution [], \
2399-
lifetime constraints [InEnvironment { environment: Env([]), goal: '!2 == '!1 }]"
2399+
lifetime constraints [InEnvironment { environment: Env([]), goal: '!2_0 == '!1_0 }]"
24002400
}
24012401
}
24022402
}

src/test/slg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ fn subgoal_cycle_uninhabited() {
482482
Answer {
483483
subst: Canonical {
484484
value: ConstrainedSubst {
485-
subst: [?0 := !1],
485+
subst: [?0 := !1_0],
486486
constraints: []
487487
},
488488
binders: []
@@ -550,7 +550,7 @@ fn basic_region_constraint_from_positive_impl() {
550550
constraints: [
551551
InEnvironment {
552552
environment: Env([]),
553-
goal: '!2 == '!1
553+
goal: '!1_1 == '!1_0
554554
}
555555
]
556556
},

0 commit comments

Comments
 (0)