File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,12 @@ impl_lint_pass!(LargeConstArrays => [LARGE_CONST_ARRAYS]);
46
46
47
47
impl < ' tcx > LateLintPass < ' tcx > for LargeConstArrays {
48
48
fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx Item < ' _ > ) {
49
- if !item. span . from_expansion ( )
50
- && let ItemKind :: Const ( _, generics, _) = & item. kind
49
+ if let ItemKind :: Const ( _, generics, _) = & item. kind
51
50
// Since static items may not have generics, skip generic const items.
52
51
// FIXME(generic_const_items): I don't think checking `generics.hwcp` suffices as it
53
52
// doesn't account for empty where-clauses that only consist of keyword `where` IINM.
54
53
&& generics. params . is_empty ( ) && !generics. has_where_clause_predicates
54
+ && !item. span . from_expansion ( )
55
55
&& let ty = cx. tcx . type_of ( item. owner_id ) . instantiate_identity ( )
56
56
&& let ty:: Array ( element_type, cst) = ty. kind ( )
57
57
&& let ConstKind :: Value ( _, ty:: ValTree :: Leaf ( element_count) ) = cst. kind ( )
You can’t perform that action at this time.
0 commit comments