allow host param to be lowercase
This commit is contained in:
parent
8eb3e0bf30
commit
0b095a60d2
@ -533,6 +533,10 @@ fn check_pat(&mut self, cx: &LateContext<'_>, p: &hir::Pat<'_>) {
|
||||
|
||||
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