Closed

Description
Summary
When a macro contains this item, Clippy suggests removing the macro call with the correction.
Reproducer
I tried this code:
#![warn(clippy::range_plus_one)]
macro_rules! m {
() => {
for i in 0..4 + 1 {
println!("{}", i);
}
}
}
fn main() {
m!();
}
I expected to see this happen:
A warning on the code inside the macro.
Instead, this happened:
warning: an inclusive range would be more readable
--> src/main.rs:12:5
|
12 | m!();
| ^^^^ help: use: `0..=4`
Version
Clippy 0.1.65 (2022-09-04 289279d)
Additional Labels
@rustbot label +I-suggestion-causes-error