]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/hir/map/collector.rs
Lint attributes on function arguments
[rust.git] / src / librustc / hir / map / collector.rs
index 12ea772c1fb3160c2e59424fbdd026ce15bc3540..b6807f7d3bbd2e60b1db88e12a220ddad70066d6 100644 (file)
@@ -363,6 +363,14 @@ fn visit_nested_body(&mut self, id: BodyId) {
         self.currently_in_body = prev_in_body;
     }
 
+    fn visit_arg(&mut self, arg: &'hir Arg) {
+        let node = Node::Arg(arg);
+        self.insert(arg.pat.span, arg.hir_id, node);
+        self.with_parent(arg.hir_id, |this| {
+            intravisit::walk_arg(this, arg);
+        });
+    }
+
     fn visit_item(&mut self, i: &'hir Item) {
         debug!("visit_item: {:?}", i);
         debug_assert_eq!(i.hir_id.owner,