about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-08-01 17:52:20 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2020-08-07 22:47:32 +0200
commit09e29e7e43c4e947c276efa4b281db78e49dea4e (patch)
treebb3bd36c73e89a9290d04c6b40e5b80a15bf6962 /src
parent27bb68927d55c1d893634f3865ed5f5e651a14b6 (diff)
downloadrust-09e29e7e43c4e947c276efa4b281db78e49dea4e.tar.gz
rust-09e29e7e43c4e947c276efa4b281db78e49dea4e.zip
fix clippy::redundant_pattern_matching: use .is_some() instead of if let Some(_) = ..
Diffstat (limited to 'src')
-rw-r--r--src/librustc_infer/infer/error_reporting/nice_region_error/static_impl_trait.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_infer/infer/error_reporting/nice_region_error/static_impl_trait.rs b/src/librustc_infer/infer/error_reporting/nice_region_error/static_impl_trait.rs
index 0125e0f48e8..7493b8b0a9f 100644
--- a/src/librustc_infer/infer/error_reporting/nice_region_error/static_impl_trait.rs
+++ b/src/librustc_infer/infer/error_reporting/nice_region_error/static_impl_trait.rs
@@ -257,7 +257,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
                             param.param_ty.to_string(),
                             Applicability::MaybeIncorrect,
                         );
-                    } else if let Some(_) = opaque
+                    } else if opaque
                         .bounds
                         .iter()
                         .filter_map(|arg| match arg {
@@ -269,6 +269,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
                             _ => None,
                         })
                         .next()
+                        .is_some()
                     {
                     } else {
                         err.span_suggestion_verbose(