From 5646b65cf58123679fdf4ef489f690d1b21e1436 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Thu, 18 Apr 2024 19:18:35 +0000 Subject: Pass translation closure to add_to_diag_with() as reference --- compiler/rustc_pattern_analysis/src/errors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_pattern_analysis/src/errors.rs') diff --git a/compiler/rustc_pattern_analysis/src/errors.rs b/compiler/rustc_pattern_analysis/src/errors.rs index 75b7b7c8f67..27f227e6d9c 100644 --- a/compiler/rustc_pattern_analysis/src/errors.rs +++ b/compiler/rustc_pattern_analysis/src/errors.rs @@ -65,7 +65,7 @@ impl<'tcx> Subdiagnostic for Overlap<'tcx> { fn add_to_diag_with>( self, diag: &mut Diag<'_, G>, - _: F, + _: &F, ) { let Overlap { span, range } = self; @@ -113,7 +113,7 @@ impl<'tcx> Subdiagnostic for GappedRange<'tcx> { fn add_to_diag_with>( self, diag: &mut Diag<'_, G>, - _: F, + _: &F, ) { let GappedRange { span, gap, first_range } = self; -- cgit 1.4.1-3-g733a5