mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Fix clippy warning
Fix cyclomatic_complexity warning on `check_expr` by allowing it. This is preferable to increasing the threshold every time the method changes.
This commit is contained in:
parent
57af95b6f5
commit
89cb053146
1 changed files with 1 additions and 3 deletions
|
@ -680,9 +680,7 @@ impl LintPass for Pass {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
#[allow(unused_attributes)]
|
#[allow(cyclomatic_complexity)]
|
||||||
// ^ required because `cyclomatic_complexity` attribute shows up as unused
|
|
||||||
#[cyclomatic_complexity = "30"]
|
|
||||||
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
|
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
|
||||||
if in_macro(expr.span) {
|
if in_macro(expr.span) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue