about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorSmitty <me@smitop.com>2021-05-26 19:55:27 -0400
committerSmitty <me@smitop.com>2021-05-26 19:55:27 -0400
commitedef5bc31bce648723ad0ddb2de4c0d1969fc8d0 (patch)
treef2321a9d9bf9bd6364e778d9531dde03e1a1811b /compiler/rustc_lint/src
parentf6a28aa4036415d8aa713bf707842779b709935e (diff)
Lint against non-camelCase trait alias names
Type aliases are linted as such, so (unstable) trait aliases should be
treated the same way.
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/nonstandard_style.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/nonstandard_style.rs b/compiler/rustc_lint/src/nonstandard_style.rs
index be9c6eafb6f..7146dd51aa7 100644
--- a/compiler/rustc_lint/src/nonstandard_style.rs
+++ b/compiler/rustc_lint/src/nonstandard_style.rs
@@ -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),
             _ => (),
         }
     }