Skip to content

Commit 2279907

Browse files
varkoryodaldevoid
andcommitted
Take Const into account with nonstandard style lint
Co-Authored-By: Gabriel Smith <[email protected]>
1 parent 10602f1 commit 2279907

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/librustc_lint/nonstandard_style.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,16 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonUpperCaseGlobals {
455455
}
456456
}
457457
}
458+
459+
fn check_generic_param(&mut self, cx: &LateContext, param: &hir::GenericParam) {
460+
if let GenericParamKind::Const { .. } = param.kind {
461+
NonUpperCaseGlobals::check_upper_case(
462+
cx,
463+
"const parameter",
464+
&param.name.ident(),
465+
);
466+
}
467+
}
458468
}
459469

460470
#[cfg(test)]

0 commit comments

Comments
 (0)