File tree 1 file changed +7
-0
lines changed
compiler/rustc_type_ir/src/search_graph
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -53,14 +53,21 @@ impl<X: Cx> GlobalCache<X> {
53
53
) {
54
54
let result = cx. mk_tracked ( result, dep_node) ;
55
55
let entry = self . map . entry ( input) . or_default ( ) ;
56
+ let result_tracked = cx. get_tracked ( & result) ;
56
57
if encountered_overflow {
57
58
let with_overflow = WithOverflow { nested_goals, result } ;
58
59
let prev = entry. with_overflow . insert ( additional_depth, with_overflow) ;
60
+ if let Some ( prev) = & prev {
61
+ assert_eq ! ( cx. get_tracked( & prev. result) , result_tracked) ;
62
+ }
59
63
if !cx. evaluation_is_concurrent ( ) {
60
64
assert ! ( prev. is_none( ) ) ;
61
65
} ;
62
66
} else {
63
67
let prev = entry. success . replace ( Success { additional_depth, nested_goals, result } ) ;
68
+ if let Some ( prev) = & prev {
69
+ assert_eq ! ( cx. get_tracked( & prev. result) , result_tracked) ;
70
+ }
64
71
if !cx. evaluation_is_concurrent ( ) {
65
72
assert ! ( prev. is_none( ) ) ;
66
73
}
You can’t perform that action at this time.
0 commit comments