Skip to content

Commit bef7fe2

Browse files
committed
Update more test to allow disallowed_names lint
1 parent 723bb14 commit bef7fe2

File tree

85 files changed

+702
-631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+702
-631
lines changed

clippy_lints/src/disallowed_names.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,10 @@ impl<'tcx> LateLintPass<'tcx> for DisallowedNames {
6969
_: rustc_span::def_id::LocalDefId,
7070
) {
7171
match kind {
72-
FnKind::ItemFn(ident, ..) => {
72+
FnKind::ItemFn(ident, ..) | FnKind::Method(ident, _) => {
7373
self.check(cx, ident, cx.last_node_with_lint_attrs);
7474
},
75-
FnKind::Method(ident, _) => {
76-
self.check(cx, ident, cx.last_node_with_lint_attrs);
77-
},
78-
_ => {},
75+
FnKind::Closure => {},
7976
}
8077
}
8178
}

tests/ui/arithmetic_side_effects.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![feature(f16)]
55
#![allow(
66
clippy::assign_op_pattern,
7+
clippy::disallowed_names,
78
clippy::erasing_op,
89
clippy::identity_op,
910
clippy::no_effect,

0 commit comments

Comments
 (0)