Skip to content

Commit 97b4b7f

Browse files
committed
use impl Trait argument instead of generic param for simplicity
1 parent 7f871ab commit 97b4b7f

File tree

1 file changed

+5
-4
lines changed
  • compiler/rustc_hir_analysis/src/coherence

1 file changed

+5
-4
lines changed

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ struct Checker<'tcx> {
5353
}
5454

5555
impl<'tcx> Checker<'tcx> {
56-
fn check<F>(&self, trait_def_id: Option<DefId>, f: F) -> Result<(), ErrorGuaranteed>
57-
where
58-
F: FnOnce(TyCtxt<'tcx>, LocalDefId) -> Result<(), ErrorGuaranteed>,
59-
{
56+
fn check(
57+
&self,
58+
trait_def_id: Option<DefId>,
59+
f: impl FnOnce(TyCtxt<'tcx>, LocalDefId) -> Result<(), ErrorGuaranteed>,
60+
) -> Result<(), ErrorGuaranteed> {
6061
if Some(self.trait_def_id) == trait_def_id { f(self.tcx, self.impl_def_id) } else { Ok(()) }
6162
}
6263
}

0 commit comments

Comments
 (0)