@@ -2,8 +2,8 @@ use clippy_config::Conf;
2
2
use clippy_utils:: diagnostics:: span_lint_and_then;
3
3
use clippy_utils:: macros:: root_macro_call_first_node;
4
4
use clippy_utils:: source:: snippet_opt;
5
- use rustc_ast:: { AttrArgs , AttrArgsEq , AttrKind , Attribute , LitKind } ;
6
- use rustc_hir:: { Expr , ExprKind } ;
5
+ use rustc_ast:: { LitKind } ;
6
+ use rustc_hir:: { Expr , ExprKind , Attribute , AttrArgs , AttrKind } ;
7
7
use rustc_lint:: { LateContext , LateLintPass } ;
8
8
use rustc_session:: impl_lint_pass;
9
9
use rustc_span:: { Span , sym} ;
@@ -93,10 +93,10 @@ impl LateLintPass<'_> for LargeIncludeFile {
93
93
if !attr. span . from_expansion ( )
94
94
// Currently, rustc limits the usage of macro at the top-level of attributes,
95
95
// so we don't need to recurse into each level.
96
- && let AttrKind :: Normal ( ref normal ) = attr. kind
96
+ && let AttrKind :: Normal ( ref item ) = attr. kind
97
97
&& let Some ( doc) = attr. doc_str ( )
98
98
&& doc. as_str ( ) . len ( ) as u64 > self . max_file_size
99
- && let AttrArgs :: Eq { expr : AttrArgsEq :: Hir ( ref meta) , .. } = normal . item . args
99
+ && let AttrArgs :: Eq { expr : meta, .. } = & item. args
100
100
&& !attr. span . contains ( meta. span )
101
101
// Since the `include_str` is already expanded at this point, we can only take the
102
102
// whole attribute snippet and then modify for our suggestion.
0 commit comments