File tree 1 file changed +9
-0
lines changed
compiler/rustc_trait_selection/src/solve/search_graph
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,15 @@ impl<'tcx> SearchGraph<'tcx> {
253
253
debug_assert ! ( entry. cycle_root_depth >= root_depth) ;
254
254
entry. cycle_root_depth = root_depth;
255
255
root. cycle_participants . insert ( entry. input ) ;
256
+ // FIXME(@lcnr): I believe that this line is needed as we could
257
+ // otherwise access a cache entry for the root of a cycle while
258
+ // computing the result of a cycle participant. This can result
259
+ // in unstable results due to incompleteness.
260
+ //
261
+ // However, a test for this would be an even more complex version of
262
+ // tests/ui/traits/new-solver/coinduction/incompleteness-unstable-result.rs.
263
+ // I did not bother to write such a test and we have no regression test
264
+ // for this. It would be good to have such a test :)
256
265
#[ allow( rustc:: potential_query_instability) ]
257
266
root. cycle_participants . extend ( entry. cycle_participants . drain ( ) ) ;
258
267
}
You can’t perform that action at this time.
0 commit comments