diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-26 13:42:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-26 13:42:31 +0200 |
| commit | 3b3f7bd020b2ff39a14a4047c859675bced55213 (patch) | |
| tree | 0c9ab9c61f38ecd2229b487d3cf6191ef1b1904f /src/librustc_interface | |
| parent | 96c1bb571abd77fcb706d7cdb4a0823a471767c2 (diff) | |
| parent | 8862f829bbfbc25a2b4e02210a94907787d1cd8b (diff) | |
Rollup merge of #71562 - matthiaskrgr:cl7ppy, r=Dylan-DPC
fix more clippy warnings
clippy::{redundant_pattern_matching, clone_on_copy, iter_cloned_collect, option_as_ref_deref, match_ref_pats}
r? @Dylan-DPC
Diffstat (limited to 'src/librustc_interface')
| -rw-r--r-- | src/librustc_interface/util.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs index fda01725443..367dc4dee7e 100644 --- a/src/librustc_interface/util.rs +++ b/src/librustc_interface/util.rs @@ -625,8 +625,8 @@ impl<'a, 'b> ReplaceBodyWithLoop<'a, 'b> { | ast::TyKind::Rptr(_, ast::MutTy { ty: ref subty, .. }) | ast::TyKind::Paren(ref subty) => involves_impl_trait(subty), ast::TyKind::Tup(ref tys) => any_involves_impl_trait(tys.iter()), - ast::TyKind::Path(_, ref path) => path.segments.iter().any(|seg| { - match seg.args.as_ref().map(|generic_arg| &**generic_arg) { + ast::TyKind::Path(_, ref path) => { + path.segments.iter().any(|seg| match seg.args.as_deref() { None => false, Some(&ast::GenericArgs::AngleBracketed(ref data)) => { data.args.iter().any(|arg| match arg { @@ -647,8 +647,8 @@ impl<'a, 'b> ReplaceBodyWithLoop<'a, 'b> { any_involves_impl_trait(data.inputs.iter()) || ReplaceBodyWithLoop::should_ignore_fn(&data.output) } - } - }), + }) + } _ => false, } } |
