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]);
4646
4747impl < ' tcx > LateLintPass < ' tcx > for LargeConstArrays {
4848 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
5150 // Since static items may not have generics, skip generic const items.
5251 // FIXME(generic_const_items): I don't think checking `generics.hwcp` suffices as it
5352 // doesn't account for empty where-clauses that only consist of keyword `where` IINM.
5453 && generics. params . is_empty ( ) && !generics. has_where_clause_predicates
54+ && !item. span . from_expansion ( )
5555 && let ty = cx. tcx . type_of ( item. owner_id ) . instantiate_identity ( )
5656 && let ty:: Array ( element_type, cst) = ty. kind ( )
5757 && let ConstKind :: Value ( _, ty:: ValTree :: Leaf ( element_count) ) = cst. kind ( )
You can’t perform that action at this time.
0 commit comments