allow host param to be lowercase
This commit is contained in:
parent
8eb3e0bf30
commit
0b095a60d2
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue