Consider Copy/Clone too
This commit is contained in:
@@ -208,6 +208,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
// TODO:
|
||||
if let ty::CoroutineWitness(def_id, _) = goal.predicate.self_ty().kind() {
|
||||
match ecx.typing_mode() {
|
||||
TypingMode::Analysis { stalled_generators, defining_opaque_types: _ } => {
|
||||
@@ -274,6 +275,22 @@ where
|
||||
return Err(NoSolution);
|
||||
}
|
||||
|
||||
// TODO:
|
||||
if let ty::CoroutineWitness(def_id, _) = goal.predicate.self_ty().kind() {
|
||||
match ecx.typing_mode() {
|
||||
TypingMode::Analysis { stalled_generators, defining_opaque_types: _ } => {
|
||||
if def_id.as_local().is_some_and(|def_id| stalled_generators.contains(&def_id))
|
||||
{
|
||||
return ecx.forced_ambiguity(MaybeCause::Ambiguity);
|
||||
}
|
||||
}
|
||||
TypingMode::Coherence
|
||||
| TypingMode::PostAnalysis
|
||||
| TypingMode::Borrowck { defining_opaque_types: _ }
|
||||
| TypingMode::PostBorrowckAnalysis { defined_opaque_types: _ } => {}
|
||||
}
|
||||
}
|
||||
|
||||
ecx.probe_and_evaluate_goal_for_constituent_tys(
|
||||
CandidateSource::BuiltinImpl(BuiltinImplSource::Misc),
|
||||
goal,
|
||||
|
||||
Reference in New Issue
Block a user