diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-01-29 03:12:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-29 03:12:22 +0100 |
| commit | 28393070ab48923d1616ea5afd4f67cd1f2e346f (patch) | |
| tree | ce0f1863bb11d4ed4e3fba2c45a4cbb31f9bf86c /src/tools/clippy | |
| parent | 7e123e49400b85cd5d584d6e1d2c46663bb94846 (diff) | |
| parent | c22a27130dde7d7ccf5d76fd021476ddbfdecfa0 (diff) | |
| download | rust-28393070ab48923d1616ea5afd4f67cd1f2e346f.tar.gz rust-28393070ab48923d1616ea5afd4f67cd1f2e346f.zip | |
Rollup merge of #136164 - celinval:chores-fnkind, r=oli-obk
Refactor FnKind variant to hold &Fn Pulling the change suggested in #128045 to reduce the impact of changing `Fn` item. r? `@oli-obk`
Diffstat (limited to 'src/tools/clippy')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/multiple_bound_locations.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_lints/src/multiple_bound_locations.rs b/src/tools/clippy/clippy_lints/src/multiple_bound_locations.rs index 882ab2dda7a..0e1980a6acb 100644 --- a/src/tools/clippy/clippy_lints/src/multiple_bound_locations.rs +++ b/src/tools/clippy/clippy_lints/src/multiple_bound_locations.rs @@ -1,5 +1,5 @@ use rustc_ast::visit::FnKind; -use rustc_ast::{NodeId, WherePredicateKind}; +use rustc_ast::{Fn, NodeId, WherePredicateKind}; use rustc_data_structures::fx::FxHashMap; use rustc_lint::{EarlyContext, EarlyLintPass}; use rustc_session::declare_lint_pass; @@ -39,7 +39,7 @@ declare_lint_pass!(MultipleBoundLocations => [MULTIPLE_BOUND_LOCATIONS]); impl EarlyLintPass for MultipleBoundLocations { fn check_fn(&mut self, cx: &EarlyContext<'_>, kind: FnKind<'_>, _: Span, _: NodeId) { - if let FnKind::Fn(_, _, _, _, generics, _) = kind + if let FnKind::Fn(_, _, _, Fn { generics, .. }) = kind && !generics.params.is_empty() && !generics.where_clause.predicates.is_empty() { |
