]> git.lizzy.rs Git - rust.git/commitdiff
Adapt run-pass tests to the tool_lints
authorflip1995 <9744647+flip1995@users.noreply.github.com>
Mon, 30 Jul 2018 09:33:44 +0000 (11:33 +0200)
committerManish Goregaokar <manishsmail@gmail.com>
Wed, 29 Aug 2018 18:08:29 +0000 (11:08 -0700)
17 files changed:
tests/run-pass/associated-constant-ice.rs
tests/run-pass/enum-glob-import-crate.rs
tests/run-pass/ice-1588.rs
tests/run-pass/ice-1969.rs
tests/run-pass/ice-2499.rs
tests/run-pass/ice-2760.rs
tests/run-pass/ice-2774.rs
tests/run-pass/ice-700.rs
tests/run-pass/ice_exacte_size.rs
tests/run-pass/if_same_then_else.rs
tests/run-pass/match_same_arms_const.rs
tests/run-pass/mut_mut_macro.rs
tests/run-pass/needless_borrow_fp.rs
tests/run-pass/needless_lifetimes_impl_trait.rs
tests/run-pass/regressions.rs
tests/run-pass/single-match-else.rs
tests/run-pass/used_underscore_binding_macro.rs

index 744de9bcf384da5e405d67b3825f0d2b8d5d735d..2c5c90683cced053fecf8980f8c99ff71b684b63 100644 (file)
@@ -1,6 +1,3 @@
-
-
-
 pub trait Trait {
     const CONSTANT: u8;
 }
index 21ed2dbf9910d4a582442358475a187598f799ef..6014558a184f2104d288cdd1149cf27b40bf0847 100644 (file)
@@ -1,6 +1,6 @@
+#![feature(tool_lints)]
 
-
-#![deny(clippy)]
+#![deny(clippy::all)]
 #![allow(unused_imports)]
 
 use std::*;
index 780df52351154e0f149f84891d94a4288dfec40c..fcda3814e4a8dcf87e5767afd4c9806e46e262f7 100644 (file)
@@ -1,6 +1,6 @@
+#![feature(tool_lints)]
 
-
-#![allow(clippy)]
+#![allow(clippy::all)]
 
 fn main() {
     match 1 {
index 296339828480dc34bca63ba9b1cc2bb723d9e85e..43d6bd8bfbc1a7601d45b9f254d8260f32ae9a5e 100644 (file)
@@ -1,6 +1,6 @@
+#![feature(tool_lints)]
 
-
-#![allow(clippy)]
+#![allow(clippy::all)]
 
 fn main() { }
 
index 01deb7abfc1065d75d3221d260d18865a471b8ad..c6793a78529a62afe0179810764c18040fc6ca43 100644 (file)
@@ -1,4 +1,6 @@
-#![allow(dead_code, char_lit_as_u8, needless_bool)]
+#![feature(tool_lints)]
+
+#![allow(dead_code, clippy::char_lit_as_u8, clippy::needless_bool)]
 
 /// Should not trigger an ICE in `SpanlessHash` / `consts::constant`
 ///
index 01ca6d42a948bf092dba58be6789648ec96a00bb..2e9c6d527c4453a6124cf60ac2132762652d4db7 100644 (file)
@@ -1,4 +1,7 @@
-#![allow(unused_variables, blacklisted_name, needless_pass_by_value, dead_code)]
+#![feature(tool_lints)]
+
+#![allow(unused_variables, clippy::blacklisted_name,
+         clippy::needless_pass_by_value, dead_code)]
 
 // This should not compile-fail with:
 //
index c6d9bb4a276e118200ecbce8867945ef4834f05c..6b14a2b5e03b6d36370bd53d90144d58847ef6c2 100644 (file)
@@ -1,3 +1,5 @@
+#![feature(tool_lints)]
+
 use std::collections::HashSet;
 
 // See https://github.com/rust-lang-nursery/rust-clippy/issues/2774
@@ -10,7 +12,7 @@ pub struct Bar {
 #[derive(Eq, PartialEq, Debug, Hash)]
 pub struct Foo {}
 
-#[allow(implicit_hasher)]
+#[allow(clippy::implicit_hasher)]
 // This should not cause a 'cannot relate bound region' ICE
 pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) {
     let mut foos = HashSet::new();
@@ -19,7 +21,7 @@ pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) {
     );
 }
 
-#[allow(implicit_hasher)]
+#[allow(clippy::implicit_hasher)]
 // Also this should not cause a 'cannot relate bound region' ICE
 pub fn add_barfoos_to_foos2(bars: &HashSet<&Bar>) {
     let mut foos = HashSet::new();
index a1e3a6756e9e365fe5f7f8cc420402f9863711df..3992af2c2802b4d6394e5d3f49a564d94bf38d1a 100644 (file)
@@ -1,6 +1,6 @@
+#![feature(tool_lints)]
 
-
-#![deny(clippy)]
+#![deny(clippy::all)]
 
 fn core() {}
 
index 914153c64fff9364720ff4643ed5ae5888d66ddf..3d25aa50499930b5ba7b8427e9b74b31ad908129 100644 (file)
@@ -1,4 +1,6 @@
-#![deny(clippy)]
+#![feature(tool_lints)]
+
+#![deny(clippy::all)]
 
 #[allow(dead_code)]
 struct Foo;
index eb14ce807564fb3c73459f9f44e6853e89919bcc..b7536e250285ca9abad2fa8e529ccd18cde814e4 100644 (file)
@@ -1,4 +1,6 @@
-#![deny(if_same_then_else)]
+#![feature(tool_lints)]
+
+#![deny(clippy::if_same_then_else)]
 
 fn main() {}
 
index 08acc2bc4d81c1164785747700ca17dd472a59ef..59b939f3e018655188c57d9c6ea7c6fa36fb054d 100644 (file)
@@ -1,4 +1,6 @@
-#![deny(match_same_arms)]
+#![feature(tool_lints)]
+
+#![deny(clippy::match_same_arms)]
 
 const PRICE_OF_SWEETS: u32 = 5;
 const PRICE_OF_KINDNESS: u32 = 0;
index 2b916c025d31586f94e010359740c733eac52310..bfb9cfc71703700a5ee4d02dc3484c1ee0601965 100644 (file)
@@ -1,4 +1,6 @@
-#![deny(mut_mut, zero_ptr, cmp_nan)]
+#![feature(tool_lints)]
+
+#![deny(clippy::mut_mut, clippy::zero_ptr, clippy::cmp_nan)]
 #![allow(dead_code)]
 
 // compiletest + extern crates doesn't work together
index 9dc508006eda754a91baa0dbaed397467c15b6fb..204968e48d0ac055ecdd9765d3b2d0657cd56e82 100644 (file)
@@ -1,4 +1,6 @@
-#[deny(clippy)]
+#![feature(tool_lints)]
+
+#[deny(clippy::all)]
 
 #[derive(Debug)]
 pub enum Error {
index 700215baa64ab624eaab9875895434a09f6018c9..f727b2547e3c5c107fc7963f2e6e41a0b1153890 100644 (file)
@@ -1,5 +1,6 @@
+#![feature(tool_lints)]
 
-#![deny(needless_lifetimes)]
+#![deny(clippy::needless_lifetimes)]
 #![allow(dead_code)]
 
 trait Foo {}
index d5e343c56c2077bc7490d4ffa354fe934248216f..aa4e16d39498fe24fc73bf07779c6821e9fbbf01 100644 (file)
@@ -1,6 +1,6 @@
+#![feature(tool_lints)]
 
-
-#![allow(blacklisted_name)]
+#![allow(clippy::blacklisted_name)]
 
 pub fn foo(bar: *const u8) {
     println!("{:#p}", bar);
index b8fa7294dcde884b7ce22c42a852058ef929be1c..379a98fc3ecf8f01b40f36495666e7d1af08a8f8 100644 (file)
@@ -1,6 +1,6 @@
+#![feature(tool_lints)]
 
-
-#![warn(single_match_else)]
+#![warn(clippy::single_match_else)]
 
 fn main() {
     let n = match (42, 43) {
index c9c77257c0ecf2d238962c87075a341c9ca1e962..73f48a96e777c32fba07ebcdbb8a29617eed5c92 100644 (file)
@@ -1,12 +1,13 @@
+#![feature(tool_lints)]
 
-
+#![allow(clippy::useless_attribute)] //issue #2910
 
 #[macro_use]
 extern crate serde_derive;
 
 /// Test that we do not lint for unused underscores in a `MacroAttribute`
 /// expansion
-#[deny(used_underscore_binding)]
+#[deny(clippy::used_underscore_binding)]
 #[derive(Deserialize)]
 struct MacroAttributesTest {
     _foo: u32,