Skip to content

Commit 0abbc38

Browse files
Merge #3435
3435: remove unused allow() attributes, NFC r=flip1995 a=matthiaskrgr Co-authored-by: Matthias Krüger <[email protected]>
2 parents f5d868c + 3a11cd4 commit 0abbc38

13 files changed

+3
-21
lines changed

clippy_lints/src/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
293293
instance,
294294
promoted: None,
295295
};
296-
296+
297297
let result = self.tcx.const_eval(self.param_env.and(gid)).ok()?;
298298
let ret = miri_to_const(self.tcx, result);
299299
if ret.is_some() {

clippy_lints/src/drop_forget_ref.rs

-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ const DROP_COPY_SUMMARY: &str = "calls to `std::mem::drop` with a value that imp
116116
const FORGET_COPY_SUMMARY: &str = "calls to `std::mem::forget` with a value that implements Copy. \
117117
Forgetting a copy leaves the original intact.";
118118

119-
#[allow(missing_copy_implementations)]
120119
pub struct Pass;
121120

122121
impl LintPass for Pass {

clippy_lints/src/enum_variants.rs

-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ fn partial_rmatch(post: &str, name: &str) -> usize {
156156
.count()
157157
}
158158

159-
// FIXME: #600
160-
#[allow(clippy::while_let_on_iterator)]
161159
fn check_variant(
162160
cx: &EarlyContext<'_>,
163161
threshold: u64,

clippy_lints/src/eta_reduction.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use crate::rustc::hir::*;
1515
use crate::utils::{is_adjusted, iter_input_pats, snippet_opt, span_lint_and_then};
1616
use crate::rustc_errors::Applicability;
1717

18-
#[allow(missing_copy_implementations)]
1918
pub struct EtaPass;
2019

2120

clippy_lints/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#![feature(slice_patterns)]
1616
#![feature(stmt_expr_attributes)]
1717
#![feature(range_contains)]
18-
#![allow(clippy::shadow_reuse, clippy::missing_docs_in_private_items)]
18+
#![allow(clippy::missing_docs_in_private_items)]
1919
#![recursion_limit = "256"]
2020
#![feature(macro_at_most_once_rep)]
2121

@@ -1005,7 +1005,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
10051005

10061006
// only exists to let the dogfood integration test works.
10071007
// Don't run clippy as an executable directly
1008-
#[allow(dead_code, clippy::print_stdout)]
1008+
#[allow(dead_code)]
10091009
fn main() {
10101010
panic!("Please use the cargo-clippy executable");
10111011
}

clippy_lints/src/minmax.rs

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ declare_clippy_lint! {
3535
"`min(_, max(_, _))` (or vice versa) with bounds clamping the result to a constant"
3636
}
3737

38-
#[allow(missing_copy_implementations)]
3938
pub struct MinMaxPass;
4039

4140
impl LintPass for MinMaxPass {

clippy_lints/src/panic_unimplemented.rs

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ declare_clippy_lint! {
5252
"`unimplemented!` should not be present in production code"
5353
}
5454

55-
#[allow(missing_copy_implementations)]
5655
pub struct Pass;
5756

5857
impl LintPass for Pass {

clippy_lints/src/redundant_pattern_matching.rs

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ impl LintPass for Pass {
6363
}
6464

6565
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
66-
#[allow(clippy::similar_names)]
6766
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
6867
if let ExprKind::Match(ref op, ref arms, ref match_source) = expr.node {
6968
match match_source {

clippy_lints/src/types.rs

-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ use crate::utils::paths;
3434
use crate::consts::{constant, Constant};
3535

3636
/// Handles all the linting of funky types
37-
#[allow(missing_copy_implementations)]
3837
pub struct TypePass;
3938

4039
/// **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 {
371370
false
372371
}
373372

374-
#[allow(missing_copy_implementations)]
375373
pub struct LetPass;
376374

377375
/// **What it does:** Checks for binding a unit value.
@@ -447,7 +445,6 @@ declare_clippy_lint! {
447445
"comparing unit values"
448446
}
449447

450-
#[allow(missing_copy_implementations)]
451448
pub struct UnitCmp;
452449

453450
impl LintPass for UnitCmp {
@@ -1142,7 +1139,6 @@ declare_clippy_lint! {
11421139
"usage of very complex types that might be better factored into `type` definitions"
11431140
}
11441141

1145-
#[allow(missing_copy_implementations)]
11461142
pub struct TypeComplexityPass {
11471143
threshold: u64,
11481144
}

clippy_lints/src/utils/author.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
//! A group of attributes that can be attached to Rust code in order
1212
//! to generate a clippy lint detecting said code automatically.
1313
14-
#![allow(clippy::print_stdout, clippy::use_debug)]
15-
1614
use crate::rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
1715
use crate::rustc::{declare_tool_lint, lint_array};
1816
use crate::rustc::hir;

clippy_lints/src/utils/inspector.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// except according to those terms.
99

1010

11-
#![allow(clippy::print_stdout, clippy::use_debug)]
12-
1311
//! checks for attributes
1412
1513
use crate::rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};

src/driver.rs

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use std::convert::TryInto;
2727
use std::path::Path;
2828
use std::process::{exit, Command};
2929

30-
#[allow(clippy::print_stdout)]
3130
fn show_version() {
3231
println!(env!("CARGO_PKG_VERSION"));
3332
}

src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@ it to allow or deny lints from the code, eg.:
4141
#[cfg_attr(feature = "cargo-clippy", allow(needless_lifetimes))]
4242
"#;
4343

44-
#[allow(clippy::print_stdout)]
4544
fn show_help() {
4645
println!("{}", CARGO_CLIPPY_HELP);
4746
}
4847

49-
#[allow(clippy::print_stdout)]
5048
fn show_version() {
5149
let version_info = rustc_tools_util::get_version_info!();
5250
println!("{}", version_info);

0 commit comments

Comments
 (0)