Auto merge of #85732 - Smittyvb:trait-alias-camelcase-lint, r=varkor
Lint against non-CamelCase trait alias names Type aliases are linted as such, so (unstable) trait aliases should be treated the same way.
This commit is contained in:
commit
8d1e3d3b74
3 changed files with 19 additions and 0 deletions
|
@ -176,6 +176,7 @@ impl EarlyLintPass for NonCamelCaseTypes {
|
|||
| ast::ItemKind::Struct(..)
|
||||
| ast::ItemKind::Union(..) => self.check_case(cx, "type", &it.ident),
|
||||
ast::ItemKind::Trait(..) => self.check_case(cx, "trait", &it.ident),
|
||||
ast::ItemKind::TraitAlias(..) => self.check_case(cx, "trait alias", &it.ident),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue