We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2d7da04 + 17d445b commit aeadf15Copy full SHA for aeadf15
clippy_lints/src/misc_early.rs
@@ -393,7 +393,8 @@ impl MiscEarlyLints {
393
// The `line!()` macro is compiler built-in and a special case for these lints.
394
let lit_snip = match snippet_opt(cx, lit.span) {
395
Some(snip) => {
396
- if snip.contains('!') {
+ // The snip could be empty in case of expand from procedure macro
397
+ if snip.is_empty() || snip.contains('!') {
398
return;
399
}
400
snip
0 commit comments