3435: remove unused allow() attributes, NFC r=flip1995 a=matthiaskrgr



Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
This commit is contained in:
bors[bot] 2018-11-17 15:24:10 +00:00
commit 0abbc38730
13 changed files with 3 additions and 21 deletions

View File

@ -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() {

View File

@ -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 {

View File

@ -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,

View File

@ -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;

View File

@ -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");
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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,
}

View File

@ -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;

View File

@ -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};

View File

@ -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"));
}

View File

@ -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);