about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMilo <50248166+Milo123459@users.noreply.github.com>2023-10-27 20:14:49 +0100
committerGitHub <noreply@github.com>2023-10-27 20:14:49 +0100
commita65d99d08702b9ceea0d153e432f5bd5f58a783a (patch)
treed2c3727fcd77c687b89de0811fac63a7a4dc2866
parent991bf752f1bbd0863864a978fee1236a93499464 (diff)
downloadrust-a65d99d08702b9ceea0d153e432f5bd5f58a783a.tar.gz
rust-a65d99d08702b9ceea0d153e432f5bd5f58a783a.zip
Update type_err_ctxt_ext.rs
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs4
1 files 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 f83ee576c29..3e7b7132082 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();