File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ impl CyclomaticComplexity {
94
94
short_circuits,
95
95
ret_adjust,
96
96
span,
97
- body. id ( ) . node_id ,
97
+ body. id ( ) . hir_id ,
98
98
) ;
99
99
} else {
100
100
let mut rust_cc = cc + divergence - match_arms - short_circuits;
@@ -197,7 +197,7 @@ fn report_cc_bug(
197
197
shorts : u64 ,
198
198
returns : u64 ,
199
199
span : Span ,
200
- _: NodeId ,
200
+ _: HirId ,
201
201
) {
202
202
span_bug ! (
203
203
span,
@@ -220,9 +220,10 @@ fn report_cc_bug(
220
220
shorts : u64 ,
221
221
returns : u64 ,
222
222
span : Span ,
223
- id : NodeId ,
223
+ id : HirId ,
224
224
) {
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) {
226
227
cx. sess ( ) . span_note_without_error (
227
228
span,
228
229
& format ! (
You can’t perform that action at this time.
0 commit comments