about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-09 20:23:40 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-09 20:23:40 +0000
commit7f871ab9aa0d7cfe850ebe41ea5122fa9d1f218e (patch)
treee3e68bc19414d2ac9a7e26b0add639567ed89cac /compiler/rustc_hir_analysis
parent23277a502ef69b82d8d541e5dc5fb129135aef9e (diff)
downloadrust-7f871ab9aa0d7cfe850ebe41ea5122fa9d1f218e.tar.gz
rust-7f871ab9aa0d7cfe850ebe41ea5122fa9d1f218e.zip
No need for FnMut when FnOnce works now
Diffstat (limited to 'compiler/rustc_hir_analysis')
-rw-r--r--compiler/rustc_hir_analysis/src/coherence/builtin.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/coherence/builtin.rs b/compiler/rustc_hir_analysis/src/coherence/builtin.rs
index 30f6bd56375..fe1a9f2eebd 100644
--- a/compiler/rustc_hir_analysis/src/coherence/builtin.rs
+++ b/compiler/rustc_hir_analysis/src/coherence/builtin.rs
@@ -53,9 +53,9 @@ struct Checker<'tcx> {
 }
 
 impl<'tcx> Checker<'tcx> {
-    fn check<F>(&self, trait_def_id: Option<DefId>, mut f: F) -> Result<(), ErrorGuaranteed>
+    fn check<F>(&self, trait_def_id: Option<DefId>, f: F) -> Result<(), ErrorGuaranteed>
     where
-        F: FnMut(TyCtxt<'tcx>, LocalDefId) -> Result<(), ErrorGuaranteed>,
+        F: FnOnce(TyCtxt<'tcx>, LocalDefId) -> Result<(), ErrorGuaranteed>,
     {
         if Some(self.trait_def_id) == trait_def_id { f(self.tcx, self.impl_def_id) } else { Ok(()) }
     }