Move in_macro check
This commit is contained in:
parent
a828692780
commit
9034b87a53
@ -99,6 +99,10 @@ fn check_fn(
|
||||
for (bb, bbdata) in mir.basic_blocks().iter_enumerated() {
|
||||
let terminator = bbdata.terminator();
|
||||
|
||||
if in_macro(terminator.source_info.span) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Give up on loops
|
||||
if terminator.successors().any(|s| *s == bb) {
|
||||
continue;
|
||||
@ -174,7 +178,6 @@ fn check_fn(
|
||||
};
|
||||
|
||||
if_chain! {
|
||||
if !in_macro(span);
|
||||
if let Some(snip) = snippet_opt(cx, span);
|
||||
if let Some(dot) = snip.rfind('.');
|
||||
then {
|
||||
|
Loading…
Reference in New Issue
Block a user