AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added.

This commit is contained in:
Andrew Zhogin
2024-08-26 16:45:15 +03:00
parent 52c1838fa7
commit c366756a85
116 changed files with 4054 additions and 1879 deletions

View File

@@ -599,19 +599,6 @@ where
.enter(|ecx| ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes))
}
fn consider_builtin_async_destruct_candidate(
ecx: &mut EvalCtxt<'_, D>,
goal: Goal<I, Self>,
) -> Result<Candidate<I>, NoSolution> {
if goal.predicate.polarity != ty::PredicatePolarity::Positive {
return Err(NoSolution);
}
// `AsyncDestruct` is automatically implemented for every type.
ecx.probe_builtin_trait_candidate(BuiltinImplSource::Misc)
.enter(|ecx| ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes))
}
fn consider_builtin_destruct_candidate(
ecx: &mut EvalCtxt<'_, D>,
goal: Goal<I, Self>,