We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
arg_iter
1 parent 6fffc89 commit d55843fCopy full SHA for d55843f
1 file changed
examples/supplementary/arg_iter/src/lib.rs
@@ -65,12 +65,16 @@ impl<'tcx> LateLintPass<'tcx> for ArgIter {
65
fn check_fn(
66
&mut self,
67
cx: &LateContext<'tcx>,
68
- _kind: FnKind<'tcx>,
+ kind: FnKind<'tcx>,
69
decl: &'tcx FnDecl<'tcx>,
70
_body: &'tcx Body<'tcx>,
71
span: Span,
72
id: LocalDefId,
73
) {
74
+ if matches!(kind, FnKind::Closure) {
75
+ return;
76
+ }
77
+
78
// Don't lint functions generated by macros (e.g. derive, attribute macros)
79
if span.from_expansion() {
80
return;
0 commit comments