diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-24 21:34:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-24 21:34:56 +0100 |
| commit | 83d1aab9ff50f9c2e07ee8e3845d525b906dc97a (patch) | |
| tree | da2539955ddf762e338520293da4b18ea8777455 /compiler/rustc_lint | |
| parent | ed2d9369f4373a2c275fe3b73c23a1d5d0377957 (diff) | |
| parent | 97d95d48e2ef72d9ededeb5821f0bfcbd8fcf7c6 (diff) | |
| download | rust-83d1aab9ff50f9c2e07ee8e3845d525b906dc97a.tar.gz rust-83d1aab9ff50f9c2e07ee8e3845d525b906dc97a.zip | |
Rollup merge of #104796 - notriddle:notriddle/unused-issue-104397, r=oli-obk
lint: do not warn unused parens around higher-ranked function pointers Fixes #104397
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/unused.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs index d6a01b42548..5c9217db118 100644 --- a/compiler/rustc_lint/src/unused.rs +++ b/compiler/rustc_lint/src/unused.rs @@ -1015,6 +1015,7 @@ impl EarlyLintPass for UnusedParens { if let ast::TyKind::Paren(r) = &ty.kind { match &r.kind { ast::TyKind::TraitObject(..) => {} + ast::TyKind::BareFn(b) if b.generic_params.len() > 0 => {} ast::TyKind::ImplTrait(_, bounds) if bounds.len() > 1 => {} ast::TyKind::Array(_, len) => { self.check_unused_delims_expr( |
