diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2018-11-17 13:47:27 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2018-11-17 13:47:46 +0100 |
| commit | 3a11cd428902feafdc70c279d2dbc950f580db3f (patch) | |
| tree | 309c24431b7c718acc507f71416af819cefb84c4 | |
| parent | f5d868c9edfc6c2a9310d564a2f738bec67dfd6b (diff) | |
| download | rust-3a11cd428902feafdc70c279d2dbc950f580db3f.tar.gz rust-3a11cd428902feafdc70c279d2dbc950f580db3f.zip | |
remove unused allow() attributes, NFC
| -rw-r--r-- | clippy_lints/src/consts.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/drop_forget_ref.rs | 1 | ||||
| -rw-r--r-- | clippy_lints/src/enum_variants.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/eta_reduction.rs | 1 | ||||
| -rw-r--r-- | clippy_lints/src/lib.rs | 4 | ||||
| -rw-r--r-- | clippy_lints/src/minmax.rs | 1 | ||||
| -rw-r--r-- | clippy_lints/src/panic_unimplemented.rs | 1 | ||||
| -rw-r--r-- | clippy_lints/src/redundant_pattern_matching.rs | 1 | ||||
| -rw-r--r-- | clippy_lints/src/types.rs | 4 | ||||
| -rw-r--r-- | clippy_lints/src/utils/author.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/utils/inspector.rs | 2 | ||||
| -rw-r--r-- | src/driver.rs | 1 | ||||
| -rw-r--r-- | src/main.rs | 2 |
13 files changed, 3 insertions, 21 deletions
diff --git a/clippy_lints/src/consts.rs b/clippy_lints/src/consts.rs index 5d509ef76f3..67c0de93496 100644 --- a/clippy_lints/src/consts.rs +++ b/clippy_lints/src/consts.rs @@ -293,7 +293,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> { instance, promoted: None, }; - + let result = self.tcx.const_eval(self.param_env.and(gid)).ok()?; let ret = miri_to_const(self.tcx, result); if ret.is_some() { diff --git a/clippy_lints/src/drop_forget_ref.rs b/clippy_lints/src/drop_forget_ref.rs index cac5d0da71d..9bead9c1d86 100644 --- a/clippy_lints/src/drop_forget_ref.rs +++ b/clippy_lints/src/drop_forget_ref.rs @@ -116,7 +116,6 @@ const DROP_COPY_SUMMARY: &str = "calls to `std::mem::drop` with a value that imp const FORGET_COPY_SUMMARY: &str = "calls to `std::mem::forget` with a value that implements Copy. \ Forgetting a copy leaves the original intact."; -#[allow(missing_copy_implementations)] pub struct Pass; impl LintPass for Pass { diff --git a/clippy_lints/src/enum_variants.rs b/clippy_lints/src/enum_variants.rs index 16d1e40484d..121a33f9475 100644 --- a/clippy_lints/src/enum_variants.rs +++ b/clippy_lints/src/enum_variants.rs @@ -156,8 +156,6 @@ fn partial_rmatch(post: &str, name: &str) -> usize { .count() } -// FIXME: #600 -#[allow(clippy::while_let_on_iterator)] fn check_variant( cx: &EarlyContext<'_>, threshold: u64, diff --git a/clippy_lints/src/eta_reduction.rs b/clippy_lints/src/eta_reduction.rs index 59c7f8a36db..95191b471a8 100644 --- a/clippy_lints/src/eta_reduction.rs +++ b/clippy_lints/src/eta_reduction.rs @@ -15,7 +15,6 @@ use crate::rustc::hir::*; use crate::utils::{is_adjusted, iter_input_pats, snippet_opt, span_lint_and_then}; use crate::rustc_errors::Applicability; -#[allow(missing_copy_implementations)] pub struct EtaPass; diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 6ebe9df6a1e..3debe567cda 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -15,7 +15,7 @@ #![feature(slice_patterns)] #![feature(stmt_expr_attributes)] #![feature(range_contains)] -#![allow(clippy::shadow_reuse, clippy::missing_docs_in_private_items)] +#![allow(clippy::missing_docs_in_private_items)] #![recursion_limit = "256"] #![feature(macro_at_most_once_rep)] @@ -1005,7 +1005,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) { // only exists to let the dogfood integration test works. // Don't run clippy as an executable directly -#[allow(dead_code, clippy::print_stdout)] +#[allow(dead_code)] fn main() { panic!("Please use the cargo-clippy executable"); } diff --git a/clippy_lints/src/minmax.rs b/clippy_lints/src/minmax.rs index 222247307c8..4a3fcfc853e 100644 --- a/clippy_lints/src/minmax.rs +++ b/clippy_lints/src/minmax.rs @@ -35,7 +35,6 @@ declare_clippy_lint! { "`min(_, max(_, _))` (or vice versa) with bounds clamping the result to a constant" } -#[allow(missing_copy_implementations)] pub struct MinMaxPass; impl LintPass for MinMaxPass { diff --git a/clippy_lints/src/panic_unimplemented.rs b/clippy_lints/src/panic_unimplemented.rs index 003c9bdf084..68b989721af 100644 --- a/clippy_lints/src/panic_unimplemented.rs +++ b/clippy_lints/src/panic_unimplemented.rs @@ -52,7 +52,6 @@ declare_clippy_lint! { "`unimplemented!` should not be present in production code" } -#[allow(missing_copy_implementations)] pub struct Pass; impl LintPass for Pass { diff --git a/clippy_lints/src/redundant_pattern_matching.rs b/clippy_lints/src/redundant_pattern_matching.rs index 7c888b36503..130b1144329 100644 --- a/clippy_lints/src/redundant_pattern_matching.rs +++ b/clippy_lints/src/redundant_pattern_matching.rs @@ -63,7 +63,6 @@ impl LintPass for Pass { } impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { - #[allow(clippy::similar_names)] fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) { if let ExprKind::Match(ref op, ref arms, ref match_source) = expr.node { match match_source { diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 035ca2b0496..c9068be838f 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -34,7 +34,6 @@ use crate::utils::paths; use crate::consts::{constant, Constant}; /// Handles all the linting of funky types -#[allow(missing_copy_implementations)] pub struct TypePass; /// **What it does:** Checks for use of `Box<Vec<_>>` anywhere in the code. @@ -371,7 +370,6 @@ fn is_any_trait(t: &hir::Ty) -> bool { false } -#[allow(missing_copy_implementations)] pub struct LetPass; /// **What it does:** Checks for binding a unit value. @@ -447,7 +445,6 @@ declare_clippy_lint! { "comparing unit values" } -#[allow(missing_copy_implementations)] pub struct UnitCmp; impl LintPass for UnitCmp { @@ -1142,7 +1139,6 @@ declare_clippy_lint! { "usage of very complex types that might be better factored into `type` definitions" } -#[allow(missing_copy_implementations)] pub struct TypeComplexityPass { threshold: u64, } diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs index 6650dd67b4f..d88a70e4e49 100644 --- a/clippy_lints/src/utils/author.rs +++ b/clippy_lints/src/utils/author.rs @@ -11,8 +11,6 @@ //! A group of attributes that can be attached to Rust code in order //! to generate a clippy lint detecting said code automatically. -#![allow(clippy::print_stdout, clippy::use_debug)] - use crate::rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; use crate::rustc::{declare_tool_lint, lint_array}; use crate::rustc::hir; diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index 54ca0736c52..e750c1c9bce 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -8,8 +8,6 @@ // except according to those terms. -#![allow(clippy::print_stdout, clippy::use_debug)] - //! checks for attributes use crate::rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; diff --git a/src/driver.rs b/src/driver.rs index 9abe6bd91de..f99c37b8519 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -27,7 +27,6 @@ use std::convert::TryInto; use std::path::Path; use std::process::{exit, Command}; -#[allow(clippy::print_stdout)] fn show_version() { println!(env!("CARGO_PKG_VERSION")); } diff --git a/src/main.rs b/src/main.rs index 4a1dc487cea..be28fe12899 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,12 +41,10 @@ it to allow or deny lints from the code, eg.: #[cfg_attr(feature = "cargo-clippy", allow(needless_lifetimes))] "#; -#[allow(clippy::print_stdout)] fn show_help() { println!("{}", CARGO_CLIPPY_HELP); } -#[allow(clippy::print_stdout)] fn show_version() { let version_info = rustc_tools_util::get_version_info!(); println!("{}", version_info); |
