File tree 1 file changed +17
-0
lines changed
compiler/rustc_next_trait_solver/src/solve
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ where
208
208
}
209
209
}
210
210
211
+ // TODO:
211
212
if let ty:: CoroutineWitness ( def_id, _) = goal. predicate . self_ty ( ) . kind ( ) {
212
213
match ecx. typing_mode ( ) {
213
214
TypingMode :: Analysis { stalled_generators, defining_opaque_types : _ } => {
@@ -274,6 +275,22 @@ where
274
275
return Err ( NoSolution ) ;
275
276
}
276
277
278
+ // TODO:
279
+ if let ty:: CoroutineWitness ( def_id, _) = goal. predicate . self_ty ( ) . kind ( ) {
280
+ match * ecx. typing_mode ( ) {
281
+ TypingModeKind :: Analysis { stalled_generators, defining_opaque_types : _ } => {
282
+ if def_id. as_local ( ) . is_some_and ( |def_id| stalled_generators. contains ( & def_id) )
283
+ {
284
+ return ecx. forced_ambiguity ( MaybeCause :: Ambiguity ) ;
285
+ }
286
+ }
287
+ TypingModeKind :: Coherence
288
+ | TypingModeKind :: PostAnalysis
289
+ | TypingModeKind :: Borrowck { defining_opaque_types : _ }
290
+ | TypingModeKind :: PostBorrowckAnalysis { defined_opaque_types : _ } => { }
291
+ }
292
+ }
293
+
277
294
ecx. probe_and_evaluate_goal_for_constituent_tys (
278
295
CandidateSource :: BuiltinImpl ( BuiltinImplSource :: Misc ) ,
279
296
goal,
You can’t perform that action at this time.
0 commit comments