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`
This commit is contained in:
commit
a4eff9d322
1 changed files with 2 additions and 2 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue