From a65d99d08702b9ceea0d153e432f5bd5f58a783a Mon Sep 17 00:00:00 2001 From: Milo <50248166+Milo123459@users.noreply.github.com> Date: Fri, 27 Oct 2023 20:14:49 +0100 Subject: [PATCH] Update type_err_ctxt_ext.rs Co-authored-by: Esteban Kuber --- .../src/traits/error_reporting/type_err_ctxt_ext.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs index f83ee576c294..3e7b71320821 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs @@ -437,10 +437,10 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> { format!(" in `{t}`"), format!("within `{t}`, "), s.map(|s| (format!("within this `{t}`"), s)), - file.and_then(|file| Some(format!( + file.map(|file| format!( "the full trait has been written to '{}'", file.display(), - ))) + )) ) }) .unwrap_or_default();