]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_lint/bad_style.rs
rustc: always include elidable lifetimes in HIR types.
[rust.git] / src / librustc_lint / bad_style.rs
index d4ab31da8a31ec59064401796222bc825ce08e5e..05ba262ef90c08eae406ba8ebe6f3b6642cb3afc 100644 (file)
@@ -377,8 +377,8 @@ fn check_impl_item(&mut self, cx: &LateContext, ii: &hir::ImplItem) {
     fn check_pat(&mut self, cx: &LateContext, p: &hir::Pat) {
         // Lint for constants that look like binding identifiers (#7526)
         if let PatKind::Path(hir::QPath::Resolved(None, ref path)) = p.node {
-            if path.segments.len() == 1 && path.segments[0].parameters.is_empty() {
-                if let Def::Const(..) = path.def {
+            if let Def::Const(..) = path.def {
+                if path.segments.len() == 1 {
                     NonUpperCaseGlobals::check_upper_case(cx,
                                                           "constant in pattern",
                                                           path.segments[0].name,