]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_lint/nonstandard_style.rs
Rollup merge of #67959 - liigo:patch-13, r=GuillaumeGomez
[rust.git] / src / librustc_lint / nonstandard_style.rs
index a97061c50ae452db916bdae87228b70e44175d82..a2b7884241ff7b9bbc4600aa68b64a47043b3be1 100644 (file)
@@ -1,16 +1,15 @@
-use lint::{EarlyContext, LateContext, LintArray, LintContext};
-use lint::{EarlyLintPass, LateLintPass, LintPass};
-use rustc::hir::def::{DefKind, Res};
-use rustc::hir::intravisit::FnKind;
-use rustc::hir::{self, GenericParamKind, PatKind};
-use rustc::lint;
+use crate::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
 use rustc::ty;
+use rustc_errors::Applicability;
+use rustc_hir as hir;
+use rustc_hir::def::{DefKind, Res};
+use rustc_hir::intravisit::FnKind;
+use rustc_hir::{GenericParamKind, PatKind};
 use rustc_span::symbol::sym;
 use rustc_span::{symbol::Ident, BytePos, Span};
 use rustc_target::spec::abi::Abi;
 use syntax::ast;
 use syntax::attr;
-use syntax::errors::Applicability;
 
 #[derive(PartialEq)]
 pub enum MethodLateContext {
@@ -142,6 +141,12 @@ fn check_item(&mut self, cx: &EarlyContext<'_>, it: &ast::Item) {
         }
     }
 
+    fn check_trait_item(&mut self, cx: &EarlyContext<'_>, it: &ast::AssocItem) {
+        if let ast::AssocItemKind::TyAlias(..) = it.kind {
+            self.check_case(cx, "associated type", &it.ident);
+        }
+    }
+
     fn check_variant(&mut self, cx: &EarlyContext<'_>, v: &ast::Variant) {
         self.check_case(cx, "variant", &v.ident);
     }