From 5bfcfeee2ac9da6a69bf62a58db3e5f80ee0a823 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Thu, 29 Dec 2022 22:46:17 -0800 Subject: Merge multiple mutable borrows of immutable binding errors Fix #53466. --- .../rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 06ab0e8d944..7c21a1047bc 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -3237,7 +3237,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> { })) = call_node { if Some(rcvr.span) == err.span.primary_span() { - err.replace_span_with(path.ident.span); + err.replace_span_with(path.ident.span, true); } } if let Some(Node::Expr(hir::Expr { -- cgit 1.4.1-3-g733a5