mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
allow host param to be lowercase
This commit is contained in:
parent
8eb3e0bf30
commit
0b095a60d2
@ -533,6 +533,10 @@ impl<'tcx> LateLintPass<'tcx> for NonUpperCaseGlobals {
|
||||
|
||||
fn check_generic_param(&mut self, cx: &LateContext<'_>, param: &hir::GenericParam<'_>) {
|
||||
if let GenericParamKind::Const { .. } = param.kind {
|
||||
// `rustc_host` params are explicitly allowed to be lowercase.
|
||||
if cx.tcx.has_attr(param.def_id, sym::rustc_host) {
|
||||
return;
|
||||
}
|
||||
NonUpperCaseGlobals::check_upper_case(cx, "const parameter", ¶m.name.ident());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user