diff --git a/clippy_lints/src/assertions_on_constants.rs b/clippy_lints/src/assertions_on_constants.rs index f88ef8e83ed..a148cb1c3a6 100644 --- a/clippy_lints/src/assertions_on_constants.rs +++ b/clippy_lints/src/assertions_on_constants.rs @@ -1,12 +1,3 @@ -// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - use crate::consts::{constant, Constant}; use crate::rustc::hir::{Expr, ExprKind}; use crate::rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; diff --git a/tests/missing-test-files.rs b/tests/missing-test-files.rs index 558e001d3d1..bd0cee75644 100644 --- a/tests/missing-test-files.rs +++ b/tests/missing-test-files.rs @@ -1,3 +1,5 @@ +#![allow(clippy::assertions_on_constants)] + use std::fs::{self, DirEntry}; use std::path::Path; diff --git a/tests/ui/assertions_on_constants.rs b/tests/ui/assertions_on_constants.rs index dcefe83f8c2..daeceebd3a2 100644 --- a/tests/ui/assertions_on_constants.rs +++ b/tests/ui/assertions_on_constants.rs @@ -1,12 +1,3 @@ -// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - fn main() { assert!(true); assert!(false); diff --git a/tests/ui/assertions_on_constants.stderr b/tests/ui/assertions_on_constants.stderr index 1f1a80e0e77..e8001acceb1 100644 --- a/tests/ui/assertions_on_constants.stderr +++ b/tests/ui/assertions_on_constants.stderr @@ -1,5 +1,5 @@ error: assert!(true) will be optimized out by the compiler - --> $DIR/assertions_on_constants.rs:11:5 + --> $DIR/assertions_on_constants.rs:2:5 | LL | assert!(true); | ^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | assert!(true); = help: remove it error: assert!(false) should probably be replaced - --> $DIR/assertions_on_constants.rs:12:5 + --> $DIR/assertions_on_constants.rs:3:5 | LL | assert!(false); | ^^^^^^^^^^^^^^^ @@ -16,7 +16,7 @@ LL | assert!(false); = help: use panic!() or unreachable!() error: assert!(true) will be optimized out by the compiler - --> $DIR/assertions_on_constants.rs:13:5 + --> $DIR/assertions_on_constants.rs:4:5 | LL | assert!(true, "true message"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -24,7 +24,7 @@ LL | assert!(true, "true message"); = help: remove it error: assert!(false) should probably be replaced - --> $DIR/assertions_on_constants.rs:14:5 + --> $DIR/assertions_on_constants.rs:5:5 | LL | assert!(false, "false message"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -32,7 +32,7 @@ LL | assert!(false, "false message"); = help: use panic!() or unreachable!() error: assert!(const: true) will be optimized out by the compiler - --> $DIR/assertions_on_constants.rs:17:5 + --> $DIR/assertions_on_constants.rs:8:5 | LL | assert!(B); | ^^^^^^^^^^^ @@ -40,7 +40,7 @@ LL | assert!(B); = help: remove it error: assert!(const: false) should probably be replaced - --> $DIR/assertions_on_constants.rs:20:5 + --> $DIR/assertions_on_constants.rs:11:5 | LL | assert!(C); | ^^^^^^^^^^^ diff --git a/tests/ui/attrs.rs b/tests/ui/attrs.rs index df7eafc6551..91b65a43be7 100644 --- a/tests/ui/attrs.rs +++ b/tests/ui/attrs.rs @@ -1,5 +1,5 @@ #![warn(clippy::inline_always, clippy::deprecated_semver)] -#![allow(clippy::assertions_on_constants::assertions_on_constants)] +#![allow(clippy::assertions_on_constants)] #[inline(always)] fn test_attr_lint() { assert!(true) diff --git a/tests/ui/collapsible_if.fixed b/tests/ui/collapsible_if.fixed index 2c6dd95a637..3c7de56406e 100644 --- a/tests/ui/collapsible_if.fixed +++ b/tests/ui/collapsible_if.fixed @@ -1,5 +1,5 @@ // run-rustfix -#![allow(clippy::cyclomatic_complexity)] +#![allow(clippy::cyclomatic_complexity, clippy::assertions_on_constants)] #[rustfmt::skip] #[warn(clippy::collapsible_if)] diff --git a/tests/ui/collapsible_if.rs b/tests/ui/collapsible_if.rs index f482d7704de..e46d7537577 100644 --- a/tests/ui/collapsible_if.rs +++ b/tests/ui/collapsible_if.rs @@ -1,5 +1,5 @@ // run-rustfix -#![allow(clippy::cyclomatic_complexity)] +#![allow(clippy::cyclomatic_complexity, clippy::assertions_on_constants)] #[rustfmt::skip] #[warn(clippy::collapsible_if)] diff --git a/tests/ui/empty_line_after_outer_attribute.rs b/tests/ui/empty_line_after_outer_attribute.rs index 3af8e3eeac0..b43dc200825 100644 --- a/tests/ui/empty_line_after_outer_attribute.rs +++ b/tests/ui/empty_line_after_outer_attribute.rs @@ -1,5 +1,5 @@ #![warn(clippy::empty_line_after_outer_attr)] -#![allow(clippy::assertions_on_constants::assertions_on_constants)] +#![allow(clippy::assertions_on_constants)] // This should produce a warning #[crate_type = "lib"] diff --git a/tests/ui/panic_unimplemented.rs b/tests/ui/panic_unimplemented.rs index a7c5b91fdb5..92290da8a6a 100644 --- a/tests/ui/panic_unimplemented.rs +++ b/tests/ui/panic_unimplemented.rs @@ -1,5 +1,5 @@ #![warn(clippy::panic_params, clippy::unimplemented)] -#![allow(clippy::assertions_on_constants::assertions_on_constants)] +#![allow(clippy::assertions_on_constants)] fn missing() { if true { panic!("{}");