File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ impl CyclomaticComplexity {
9494 short_circuits,
9595 ret_adjust,
9696 span,
97- body. id ( ) . node_id ,
97+ body. id ( ) . hir_id ,
9898 ) ;
9999 } else {
100100 let mut rust_cc = cc + divergence - match_arms - short_circuits;
@@ -197,7 +197,7 @@ fn report_cc_bug(
197197 shorts : u64 ,
198198 returns : u64 ,
199199 span : Span ,
200- _: NodeId ,
200+ _: HirId ,
201201) {
202202 span_bug ! (
203203 span,
@@ -220,9 +220,10 @@ fn report_cc_bug(
220220 shorts : u64 ,
221221 returns : u64 ,
222222 span : Span ,
223- id : NodeId ,
223+ id : HirId ,
224224) {
225- if !is_allowed ( cx, CYCLOMATIC_COMPLEXITY , id) {
225+ let node_id = cx. tcx . hir ( ) . hir_to_node_id ( id) ;
226+ if !is_allowed ( cx, CYCLOMATIC_COMPLEXITY , node_id) {
226227 cx. sess ( ) . span_note_without_error (
227228 span,
228229 & format ! (
You can’t perform that action at this time.
0 commit comments