Take Const into account with nonstandard style lint

Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
This commit is contained in:
varkor 2019-02-15 22:26:29 +00:00
parent 10602f1dbf
commit 2279907fd2

View file

@ -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",
&param.name.ident(),
);
}
}
}
#[cfg(test)]