Pass translation closure to add_to_diag_with() as reference

This commit is contained in:
Xiretza 2024-04-18 19:18:35 +00:00
parent 13eb8c736c
commit 5646b65cf5
17 changed files with 41 additions and 41 deletions

View file

@ -65,7 +65,7 @@ impl<'tcx> Subdiagnostic for Overlap<'tcx> {
fn add_to_diag_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>(
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<G: EmissionGuarantee, F: SubdiagMessageOp<G>>(
self,
diag: &mut Diag<'_, G>,
_: F,
_: &F,
) {
let GappedRange { span, gap, first_range } = self;