mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
Fix FP for nonstandard_macro_braces lint
This commit is contained in:
parent
610381455c
commit
fb9b13a69f
@ -99,7 +99,7 @@ fn is_offending_macro<'a>(cx: &EarlyContext<'_>, span: Span, mac_braces: &'a Mac
|
||||
if let Some(snip) = snippet_opt(cx, span.ctxt().outer_expn_data().call_site);
|
||||
// we must check only invocation sites
|
||||
// https://github.com/rust-lang/rust-clippy/issues/7422
|
||||
if snip.starts_with(name);
|
||||
if snip.starts_with(&format!("{}!", name));
|
||||
// make formatting consistent
|
||||
let c = snip.replace(" ", "");
|
||||
if !c.starts_with(&format!("{}!{}", name, braces.0));
|
||||
|
Loading…
Reference in New Issue
Block a user