diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-08-01 17:52:20 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-08-07 22:47:32 +0200 |
| commit | 09e29e7e43c4e947c276efa4b281db78e49dea4e (patch) | |
| tree | bb3bd36c73e89a9290d04c6b40e5b80a15bf6962 /src | |
| parent | 27bb68927d55c1d893634f3865ed5f5e651a14b6 (diff) | |
| download | rust-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.rs | 3 |
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( |
