From 523de296cc03a3c2ee2a9a8f76914d932091a3d4 Mon Sep 17 00:00:00 2001 From: "Samuel E. Moelius III" Date: Sat, 13 Feb 2021 09:04:50 -0500 Subject: [PATCH] Get tests to pass --- clippy_lints/Cargo.toml | 2 +- clippy_utils/Cargo.toml | 3 +++ clippy_utils/src/internal_lints.rs | 4 ++-- clippy_utils/src/lib.rs | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index f09df3393d7..d5ec8597044 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -39,4 +39,4 @@ syn = { version = "1", features = ["full"] } [features] deny-warnings = [] # build clippy with internal lints enabled, off by default -internal-lints = [] +internal-lints = ["clippy_utils/internal-lints"] diff --git a/clippy_utils/Cargo.toml b/clippy_utils/Cargo.toml index 1b05b543186..c83feb9c304 100644 --- a/clippy_utils/Cargo.toml +++ b/clippy_utils/Cargo.toml @@ -22,3 +22,6 @@ rustc-semver="1.1.0" url = { version = "2.1.0", features = ["serde"] } quote = "1" syn = { version = "1", features = ["full"] } + +[features] +internal-lints = [] diff --git a/clippy_utils/src/internal_lints.rs b/clippy_utils/src/internal_lints.rs index 164ecb23b14..bbfb60f11d3 100644 --- a/clippy_utils/src/internal_lints.rs +++ b/clippy_utils/src/internal_lints.rs @@ -1,7 +1,7 @@ use crate::consts::{constant_simple, Constant}; use crate::{ - is_expn_of, match_def_path, match_qpath, match_type, method_calls, path_to_res, paths, run_lints, snippet, - span_lint, span_lint_and_help, span_lint_and_sugg, SpanlessEq, + declare_clippy_lint, is_expn_of, match_def_path, match_qpath, match_type, method_calls, path_to_res, paths, + run_lints, snippet, span_lint, span_lint_and_help, span_lint_and_sugg, SpanlessEq, }; use if_chain::if_chain; use rustc_ast::ast::{Crate as AstCrate, ItemKind, LitKind, NodeId}; diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index 06f018055d5..d417e94769b 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -10,6 +10,8 @@ #![feature(rustc_private)] #![feature(stmt_expr_attributes)] #![feature(control_flow_enum)] +#![recursion_limit = "512"] +#![allow(clippy::missing_errors_doc, clippy::missing_panics_doc, clippy::must_use_candidate)] // FIXME: switch to something more ergonomic here, once available. // (Currently there is no way to opt into sysroot crates without `extern crate`.)