-use crate::utils::{in_macro, span_lint};
+use crate::utils::span_lint;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
use rustc::{declare_lint_pass, declare_tool_lint};
use syntax::ast::*;
///
/// **Example:**
/// ```rust
- /// ((0))
- /// foo((0))
- /// ((1, 2))
+ /// # fn foo(bar: usize) {}
+ /// ((0));
+ /// foo((0));
+ /// ((1, 2));
/// ```
pub DOUBLE_PARENS,
complexity,
impl EarlyLintPass for DoubleParens {
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
- if in_macro(expr.span) {
+ if expr.span.from_expansion() {
return;
}