File tree Expand file tree Collapse file tree 6 files changed +14
-13
lines changed
swc_ecma_minifier/src/compress/optimize
swc_ecma_transforms_optimization/src
swc_ecma_usage_analyzer/src/alias Expand file tree Collapse file tree 6 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ swc_ecma_ast : patch
3+ swc_ecma_lexer : patch
4+ swc_ecma_minifier : patch
5+ swc_ecma_transforms_optimization : patch
6+ swc_ecma_usage_analyzer : patch
7+ ---
8+
9+ refactor: deny unused
Original file line number Diff line number Diff line change 1- #![ allow( unused) ]
21#![ allow( non_upper_case_globals) ]
32use bitflags:: bitflags;
43
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ macro_rules! define_known_ident {
3535 ) ,*
3636 }
3737
38- #[ allow( unused) ]
3938 #[ macro_export]
4039 macro_rules! known_ident_token {
4140 $(
@@ -47,7 +46,6 @@ macro_rules! define_known_ident {
4746 ) *
4847 }
4948
50- #[ allow( unused) ]
5149 #[ macro_export]
5250 macro_rules! known_ident {
5351 $(
@@ -56,7 +54,6 @@ macro_rules! define_known_ident {
5654 } ;
5755 ) *
5856 }
59- #[ allow( unused) ]
6057 #[ macro_export]
6158 macro_rules! ident_like {
6259 $(
Original file line number Diff line number Diff line change @@ -804,9 +804,8 @@ impl Optimizer<'_> {
804804 }
805805 }
806806
807- #[ allow( unused) ]
808807 match & decl {
809- Decl :: Class ( c ) => {
808+ Decl :: Class ( _ ) => {
810809 if self . options . inline != 3
811810 || self . options . keep_classnames
812811 || self . mangle_options . is_some_and ( |v| v. keep_class_names )
@@ -822,7 +821,7 @@ impl Optimizer<'_> {
822821 c. ident. ctxt
823822 ) ;
824823 }
825- Decl :: Fn ( f ) => {
824+ Decl :: Fn ( _ ) => {
826825 if self . options . keep_fnames
827826 || self . mangle_options . is_some_and ( |v| v. keep_fn_names )
828827 {
Original file line number Diff line number Diff line change 11#![ allow( unused) ]
22
3- use std:: { fmt:: Debug , mem:: forget} ;
4-
53use swc_ecma_ast:: * ;
64use swc_ecma_visit:: { noop_visit_type, Visit , VisitWith } ;
75
1715
1816#[ cfg( debug_assertions) ]
1917struct Ctx < ' a > {
20- v : & ' a dyn Debug ,
18+ v : & ' a dyn std :: fmt :: Debug ,
2119}
2220
2321#[ cfg( debug_assertions) ]
@@ -36,7 +34,7 @@ impl Visit for AssertValid {
3634 fn visit_expr ( & mut self , n : & Expr ) {
3735 let ctx = Ctx { v : n } ;
3836 n. visit_children_with ( self ) ;
39- forget ( ctx) ;
37+ std :: mem :: forget ( ctx) ;
4038 }
4139
4240 #[ cfg( debug_assertions) ]
@@ -58,7 +56,7 @@ impl Visit for AssertValid {
5856 fn visit_stmt ( & mut self , n : & Stmt ) {
5957 let ctx = Ctx { v : n } ;
6058 n. visit_children_with ( self ) ;
61- forget ( ctx) ;
59+ std :: mem :: forget ( ctx) ;
6260 }
6361
6462 #[ cfg( debug_assertions) ]
Original file line number Diff line number Diff line change @@ -154,7 +154,6 @@ where
154154}
155155
156156pub struct InfectionCollector {
157- #[ allow( unused) ]
158157 config : AliasConfig ,
159158 unresolved_ctxt : Option < SyntaxContext > ,
160159
You can’t perform that action at this time.
0 commit comments