From 3f34196839730cfb5b241667cfcc9b94599ea0c1 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 18 Jun 2024 11:10:18 +0000 Subject: Remove redundant argument from `subdiagnostic` method --- .../src/traits/error_reporting/suggestions.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_trait_selection/src') diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index f632f1ad4f2..038f11c60b8 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -4705,14 +4705,11 @@ fn hint_missing_borrow<'tcx>( } if !to_borrow.is_empty() { - err.subdiagnostic(infcx.dcx(), errors::AdjustSignatureBorrow::Borrow { to_borrow }); + err.subdiagnostic(errors::AdjustSignatureBorrow::Borrow { to_borrow }); } if !remove_borrow.is_empty() { - err.subdiagnostic( - infcx.dcx(), - errors::AdjustSignatureBorrow::RemoveBorrow { remove_borrow }, - ); + err.subdiagnostic(errors::AdjustSignatureBorrow::RemoveBorrow { remove_borrow }); } } -- cgit 1.4.1-3-g733a5