Remove another use of clone_code

This commit is contained in:
Oli Scherer
2022-05-10 10:32:35 +00:00
parent 063795ce4a
commit dc21fcb2fc
2 changed files with 11 additions and 13 deletions

View File

@@ -183,7 +183,7 @@ impl<'tcx> ObligationCause<'tcx> {
pub fn derived_cause(
mut self,
parent_trait_pred: ty::PolyTraitPredicate<'tcx>,
variant: fn(DerivedObligationCause<'tcx>) -> ObligationCauseCode<'tcx>,
variant: impl FnOnce(DerivedObligationCause<'tcx>) -> ObligationCauseCode<'tcx>,
) -> ObligationCause<'tcx> {
/*!
* Creates a cause for obligations that are derived from