Remove clone_code method

This commit is contained in:
Oli Scherer 2022-05-10 10:42:29 +00:00
parent dc21fcb2fc
commit 05a62c5527
3 changed files with 15 additions and 31 deletions

View file

@ -80,7 +80,7 @@ impl<'tcx> TraitObligation<'tcx> {
pub fn derived_cause(
&self,
variant: fn(DerivedObligationCause<'tcx>) -> ObligationCauseCode<'tcx>,
variant: impl FnOnce(DerivedObligationCause<'tcx>) -> ObligationCauseCode<'tcx>,
) -> ObligationCause<'tcx> {
self.cause.clone().derived_cause(self.predicate, variant)
}