@@ -6,9 +6,11 @@ use oxc_ast::{
66} ;
77use oxc_ast_visit:: Visit ;
88use oxc_cfg:: {
9+ BlockNodeId , ControlFlowGraph , EdgeType , ErrorEdgeKind , InstructionKind ,
910 graph:: {
10- visit:: { set_depth_first_search, Control , DfsEvent , EdgeRef } , Direction
11- } , BlockNodeId , ControlFlowGraph , EdgeType , ErrorEdgeKind , InstructionKind
11+ Direction ,
12+ visit:: { Control , DfsEvent , EdgeRef , set_depth_first_search} ,
13+ } ,
1214} ;
1315use oxc_diagnostics:: OxcDiagnostic ;
1416use oxc_macros:: declare_oxc_lint;
@@ -216,12 +218,14 @@ impl<'a, 'b> MultipleResolvedChecker<'a, 'b> {
216218 Some ( & mut self . current_func_resolved_info_mut ( ) ?. resolved_infos )
217219 }
218220
219- #[ inline]
220- fn block_resolved_info_mut ( & mut self , block_id : BlockNodeId ) -> Option < & mut BlockResolvedInfo < ' a > > {
221+ #[ inline]
222+ fn block_resolved_info_mut (
223+ & mut self ,
224+ block_id : BlockNodeId ,
225+ ) -> Option < & mut BlockResolvedInfo < ' a > > {
221226 self . resolved_infos_mut ( ) ?. get_mut ( & block_id)
222227 }
223228
224-
225229 #[ inline]
226230 fn block_ids ( & self ) -> Option < & Vec < BlockNodeId > > {
227231 Some ( & self . current_func_resolved_info ( ) ?. block_ids )
@@ -236,8 +240,7 @@ impl<'a, 'b> MultipleResolvedChecker<'a, 'b> {
236240
237241 #[ inline]
238242 fn dominators ( & self ) -> Option < & FxHashMap < BlockNodeId , BlockNodeId > > {
239- Some ( & self
240- . current_func_resolved_info ( ) ?. dominators )
243+ Some ( & self . current_func_resolved_info ( ) ?. dominators )
241244 }
242245
243246 #[ inline]
@@ -598,13 +601,19 @@ impl<'a, 'b> MultipleResolvedChecker<'a, 'b> {
598601 self . ctx . diagnostic ( already_resolved_diagnostic ( line, multi_resolved. span ) ) ;
599602 } ) ;
600603 }
601- self . insert_block_resolved_info ( block_id, BlockResolvedInfo :: new (
602- resolved. first ( ) . copied ( ) ,
603- ResolvedKind :: Certain ,
604- throwable_after_resolved,
605- ) ) ;
604+ self . insert_block_resolved_info (
605+ block_id,
606+ BlockResolvedInfo :: new (
607+ resolved. first ( ) . copied ( ) ,
608+ ResolvedKind :: Certain ,
609+ throwable_after_resolved,
610+ ) ,
611+ ) ;
606612 } else {
607- self . insert_block_resolved_info ( block_id, BlockResolvedInfo :: new ( None , ResolvedKind :: None , throwable_after_resolved) )
613+ self . insert_block_resolved_info (
614+ block_id,
615+ BlockResolvedInfo :: new ( None , ResolvedKind :: None , throwable_after_resolved) ,
616+ )
608617 }
609618 }
610619}
0 commit comments