diff options
| author | Michael Howell <michael@notriddle.com> | 2022-11-23 17:57:11 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-11-23 17:57:11 -0700 |
| commit | 97d95d48e2ef72d9ededeb5821f0bfcbd8fcf7c6 (patch) | |
| tree | 51f811f73608b003a16d803f24ac0a1f86dcf674 /compiler | |
| parent | 80b3c6dbde3ff89a44f8eaa63e08054398b30ecd (diff) | |
| download | rust-97d95d48e2ef72d9ededeb5821f0bfcbd8fcf7c6.tar.gz rust-97d95d48e2ef72d9ededeb5821f0bfcbd8fcf7c6.zip | |
lint: do not warn unused parens around higher-ranked function pointers
Fixes #104397
Diffstat (limited to 'compiler')
| -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 0471890230a..21a060a36d2 100644 --- a/compiler/rustc_lint/src/unused.rs +++ b/compiler/rustc_lint/src/unused.rs @@ -1002,6 +1002,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( |
