Take Const into account with nonstandard style lint
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
This commit is contained in:
parent
10602f1dbf
commit
2279907fd2
1 changed files with 10 additions and 0 deletions
|
|
@ -455,6 +455,16 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonUpperCaseGlobals {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn check_generic_param(&mut self, cx: &LateContext, param: &hir::GenericParam) {
|
||||
if let GenericParamKind::Const { .. } = param.kind {
|
||||
NonUpperCaseGlobals::check_upper_case(
|
||||
cx,
|
||||
"const parameter",
|
||||
¶m.name.ident(),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue