Skip to content

Commit 7f871ab

Browse files
committed
No need for FnMut when FnOnce works now
1 parent 23277a5 commit 7f871ab

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_hir_analysis/src/coherence

1 file changed

+2
-2
lines changed

Diff for: compiler/rustc_hir_analysis/src/coherence/builtin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ struct Checker<'tcx> {
5353
}
5454

5555
impl<'tcx> Checker<'tcx> {
56-
fn check<F>(&self, trait_def_id: Option<DefId>, mut f: F) -> Result<(), ErrorGuaranteed>
56+
fn check<F>(&self, trait_def_id: Option<DefId>, f: F) -> Result<(), ErrorGuaranteed>
5757
where
58-
F: FnMut(TyCtxt<'tcx>, LocalDefId) -> Result<(), ErrorGuaranteed>,
58+
F: FnOnce(TyCtxt<'tcx>, LocalDefId) -> Result<(), ErrorGuaranteed>,
5959
{
6060
if Some(self.trait_def_id) == trait_def_id { f(self.tcx, self.impl_def_id) } else { Ok(()) }
6161
}

0 commit comments

Comments
 (0)