mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-25 20:07:21 +00:00
Don't trigger some lints inside macros
This commit is contained in:
parent
d2dab198fa
commit
a67774530f
1 changed files with 3 additions and 0 deletions
|
@ -267,6 +267,9 @@ impl EarlyLintPass for MiscEarly {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_expr(&mut self, cx: &EarlyContext, expr: &Expr) {
|
fn check_expr(&mut self, cx: &EarlyContext, expr: &Expr) {
|
||||||
|
if in_external_macro(cx, expr.span) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
match expr.node {
|
match expr.node {
|
||||||
ExprKind::Call(ref paren, _) => {
|
ExprKind::Call(ref paren, _) => {
|
||||||
if let ExprKind::Paren(ref closure) = paren.node {
|
if let ExprKind::Paren(ref closure) = paren.node {
|
||||||
|
|
Loading…
Add table
Reference in a new issue