Skip to content

Commit c9b9462

Browse files
committed
Remove visit_struct_method
1 parent e89dcb8 commit c9b9462

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

src/librustc/middle/lint.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -966,10 +966,6 @@ fn lint_unused_mut() -> visit::vt<@mut Context> {
966966
visit_fn_decl(cx, &tm.decl);
967967
visit::visit_ty_method(tm, (cx, vt));
968968
},
969-
visit_struct_method: |sm, (cx, vt)| {
970-
visit_fn_decl(cx, &sm.decl);
971-
visit::visit_struct_method(sm, (cx, vt));
972-
},
973969
visit_trait_method: |tm, (cx, vt)| {
974970
match *tm {
975971
ast::required(ref tm) => visit_fn_decl(cx, &tm.decl),
@@ -1049,14 +1045,6 @@ fn lint_missing_doc() -> visit::vt<@mut Context> {
10491045
}
10501046

10511047
visit::mk_vt(@visit::Visitor {
1052-
visit_struct_method: |m, (cx, vt)| {
1053-
if m.vis == ast::public {
1054-
check_attrs(cx, m.attrs, m.span,
1055-
"missing documentation for a method");
1056-
}
1057-
visit::visit_struct_method(m, (cx, vt));
1058-
},
1059-
10601048
visit_ty_method: |m, (cx, vt)| {
10611049
// All ty_method objects are linted about because they're part of a
10621050
// trait (no visibility)

src/libsyntax/visit.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ pub struct Visitor<E> {
9090
visit_trait_method: @fn(&trait_method, (E, vt<E>)),
9191
visit_struct_def: @fn(@struct_def, ident, &Generics, node_id, (E, vt<E>)),
9292
visit_struct_field: @fn(@struct_field, (E, vt<E>)),
93-
visit_struct_method: @fn(@method, (E, vt<E>))
9493
}
9594

9695
pub type visitor<E> = @Visitor<E>;
@@ -116,7 +115,6 @@ pub fn default_visitor<E: Copy>() -> visitor<E> {
116115
visit_trait_method: |a,b|visit_trait_method::<E>(a, b),
117116
visit_struct_def: |a,b,c,d,e|visit_struct_def::<E>(a, b, c, d, e),
118117
visit_struct_field: |a,b|visit_struct_field::<E>(a, b),
119-
visit_struct_method: |a,b|visit_struct_method::<E>(a, b)
120118
};
121119
}
122120

@@ -414,10 +412,6 @@ pub fn visit_struct_field<E: Copy>(sf: &struct_field, (e, v): (E, vt<E>)) {
414412
(v.visit_ty)(sf.node.ty, (e, v));
415413
}
416414

417-
pub fn visit_struct_method<E: Copy>(m: &method, (e, v): (E, vt<E>)) {
418-
visit_method_helper(m, (e, v));
419-
}
420-
421415
pub fn visit_block<E: Copy>(b: &blk, (e, v): (E, vt<E>)) {
422416
for b.node.view_items.iter().advance |vi| {
423417
(v.visit_view_item)(*vi, (copy e, v));
@@ -729,10 +723,6 @@ pub fn mk_simple_visitor(v: simple_visitor) -> vt<()> {
729723
f(sf);
730724
visit_struct_field(sf, (e, v));
731725
}
732-
fn v_struct_method(f: @fn(@method), m: @method, (e, v): ((), vt<()>)) {
733-
f(m);
734-
visit_struct_method(m, (e, v));
735-
}
736726
return mk_vt(@Visitor {
737727
visit_mod: |a,b,c,d|v_mod(v.visit_mod, a, b, c, d),
738728
visit_view_item: |a,b| v_view_item(v.visit_view_item, a, b),
@@ -760,7 +750,5 @@ pub fn mk_simple_visitor(v: simple_visitor) -> vt<()> {
760750
v_struct_def(v.visit_struct_def, a, b, c, d, e),
761751
visit_struct_field: |a,b|
762752
v_struct_field(v.visit_struct_field, a, b),
763-
visit_struct_method: |a,b|
764-
v_struct_method(v.visit_struct_method, a, b)
765753
});
766754
}

0 commit comments

Comments
 (0)