diff options
| -rw-r--r-- | tests/compile-test.rs | 1 | ||||
| -rw-r--r-- | tests/run-pass/ice-2727.rs | 5 | ||||
| -rw-r--r-- | tests/run-pass/ice-700.rs | 7 | ||||
| -rw-r--r-- | tests/ui/crashes/associated-constant-ice.rs (renamed from tests/run-pass/associated-constant-ice.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/cc_seme.rs (renamed from tests/run-pass/cc_seme.rs) | 3 | ||||
| -rw-r--r-- | tests/ui/crashes/enum-glob-import-crate.rs (renamed from tests/run-pass/enum-glob-import-crate.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-1588.rs (renamed from tests/run-pass/ice-1588.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-1782.rs (renamed from tests/run-pass/ice-1782.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-1969.rs (renamed from tests/run-pass/ice-1969.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-2499.rs (renamed from tests/run-pass/ice-2499.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-2594.rs (renamed from tests/run-pass/ice-2594.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-2727.rs | 7 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-2760.rs (renamed from tests/run-pass/ice-2760.rs) | 10 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-2774.rs (renamed from tests/run-pass/ice-2774.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-2865.rs (renamed from tests/run-pass/ice-2865.rs) | 3 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-3151.rs (renamed from tests/run-pass/ice-3151.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-3462.rs (renamed from tests/run-pass/ice-3462.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/ice-700.rs | 9 | ||||
| -rw-r--r-- | tests/ui/crashes/ice_exacte_size.rs (renamed from tests/run-pass/ice_exacte_size.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/if_same_then_else.rs (renamed from tests/run-pass/if_same_then_else.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/issue-2862.rs (renamed from tests/run-pass/issue-2862.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/issue-825.rs (renamed from tests/run-pass/issue-825.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/issues_loop_mut_cond.rs (renamed from tests/run-pass/issues_loop_mut_cond.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/match_same_arms_const.rs (renamed from tests/run-pass/match_same_arms_const.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/mut_mut_macro.rs (renamed from tests/run-pass/mut_mut_macro.rs) | 14 | ||||
| -rw-r--r-- | tests/ui/crashes/needless_borrow_fp.rs (renamed from tests/run-pass/needless_borrow_fp.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/needless_lifetimes_impl_trait.rs (renamed from tests/run-pass/needless_lifetimes_impl_trait.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/procedural_macro.rs (renamed from tests/run-pass/procedural_macro.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/regressions.rs (renamed from tests/run-pass/regressions.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/returns.rs (renamed from tests/run-pass/returns.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/single-match-else.rs (renamed from tests/run-pass/single-match-else.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/crashes/used_underscore_binding_macro.rs (renamed from tests/run-pass/used_underscore_binding_macro.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/whitelist/clippy.toml (renamed from tests/run-pass/whitelist/clippy.toml) | 0 | ||||
| -rw-r--r-- | tests/ui/crashes/whitelist/conf_whitelisted.rs (renamed from tests/run-pass/whitelist/conf_whitelisted.rs) | 0 |
34 files changed, 60 insertions, 25 deletions
diff --git a/tests/compile-test.rs b/tests/compile-test.rs index c67b6f08c9f..b6a4beff046 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -133,7 +133,6 @@ fn prepare_env() { #[test] fn compile_test() { prepare_env(); - run_mode("run-pass", "tests/run-pass".into()); run_mode("ui", "tests/ui".into()); run_ui_toml(); } diff --git a/tests/run-pass/ice-2727.rs b/tests/run-pass/ice-2727.rs deleted file mode 100644 index 79c6f1c55db..00000000000 --- a/tests/run-pass/ice-2727.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub fn f(new: fn()) { - new(); -} - -fn main() {} diff --git a/tests/run-pass/ice-700.rs b/tests/run-pass/ice-700.rs deleted file mode 100644 index 10546850611..00000000000 --- a/tests/run-pass/ice-700.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![deny(clippy::all)] - -fn core() {} - -fn main() { - core(); -} diff --git a/tests/run-pass/associated-constant-ice.rs b/tests/ui/crashes/associated-constant-ice.rs index 2c5c90683cc..948deba3ea6 100644 --- a/tests/run-pass/associated-constant-ice.rs +++ b/tests/ui/crashes/associated-constant-ice.rs @@ -1,3 +1,5 @@ +/// Test for https://github.com/rust-lang/rust-clippy/issues/1698 + pub trait Trait { const CONSTANT: u8; } diff --git a/tests/run-pass/cc_seme.rs b/tests/ui/crashes/cc_seme.rs index 169403df562..98588be9cf8 100644 --- a/tests/run-pass/cc_seme.rs +++ b/tests/ui/crashes/cc_seme.rs @@ -1,4 +1,7 @@ #[allow(dead_code)] + +/// Test for https://github.com/rust-lang/rust-clippy/issues/478 + enum Baz { One, Two, diff --git a/tests/run-pass/enum-glob-import-crate.rs b/tests/ui/crashes/enum-glob-import-crate.rs index dca32aa3b56..dca32aa3b56 100644 --- a/tests/run-pass/enum-glob-import-crate.rs +++ b/tests/ui/crashes/enum-glob-import-crate.rs diff --git a/tests/run-pass/ice-1588.rs b/tests/ui/crashes/ice-1588.rs index 6a5bf429f2d..b0a3d11bce4 100644 --- a/tests/run-pass/ice-1588.rs +++ b/tests/ui/crashes/ice-1588.rs @@ -1,5 +1,7 @@ #![allow(clippy::all)] +/// Test for https://github.com/rust-lang/rust-clippy/issues/1588 + fn main() { match 1 { 1 => {}, diff --git a/tests/run-pass/ice-1782.rs b/tests/ui/crashes/ice-1782.rs index 81af88962a6..81af88962a6 100644 --- a/tests/run-pass/ice-1782.rs +++ b/tests/ui/crashes/ice-1782.rs diff --git a/tests/run-pass/ice-1969.rs b/tests/ui/crashes/ice-1969.rs index eab4f338f97..96a8fe6c24d 100644 --- a/tests/run-pass/ice-1969.rs +++ b/tests/ui/crashes/ice-1969.rs @@ -1,5 +1,7 @@ #![allow(clippy::all)] +/// Test for https://github.com/rust-lang/rust-clippy/issues/1969 + fn main() {} pub trait Convert { diff --git a/tests/run-pass/ice-2499.rs b/tests/ui/crashes/ice-2499.rs index 45b3b1869dd..45b3b1869dd 100644 --- a/tests/run-pass/ice-2499.rs +++ b/tests/ui/crashes/ice-2499.rs diff --git a/tests/run-pass/ice-2594.rs b/tests/ui/crashes/ice-2594.rs index 3f3986b6fc6..3f3986b6fc6 100644 --- a/tests/run-pass/ice-2594.rs +++ b/tests/ui/crashes/ice-2594.rs diff --git a/tests/ui/crashes/ice-2727.rs b/tests/ui/crashes/ice-2727.rs new file mode 100644 index 00000000000..56024abc8f5 --- /dev/null +++ b/tests/ui/crashes/ice-2727.rs @@ -0,0 +1,7 @@ +/// Test for https://github.com/rust-lang/rust-clippy/issues/2727 + +pub fn f(new: fn()) { + new(); +} + +fn main() {} diff --git a/tests/run-pass/ice-2760.rs b/tests/ui/crashes/ice-2760.rs index 949e273997c..fddf8252329 100644 --- a/tests/run-pass/ice-2760.rs +++ b/tests/ui/crashes/ice-2760.rs @@ -5,11 +5,11 @@ dead_code )] -// This should not compile-fail with: -// -// error[E0277]: the trait bound `T: Foo` is not satisfied -// -// See https://github.com/rust-lang/rust-clippy/issues/2760 +/// This should not compile-fail with: +/// +/// error[E0277]: the trait bound `T: Foo` is not satisfied +/// +/// See https://github.com/rust-lang/rust-clippy/issues/2760 trait Foo { type Bar; diff --git a/tests/run-pass/ice-2774.rs b/tests/ui/crashes/ice-2774.rs index 2cc19ae32b8..fdc671a84e0 100644 --- a/tests/run-pass/ice-2774.rs +++ b/tests/ui/crashes/ice-2774.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; -// See https://github.com/rust-lang/rust-clippy/issues/2774 +/// See https://github.com/rust-lang/rust-clippy/issues/2774 #[derive(Eq, PartialEq, Debug, Hash)] pub struct Bar { diff --git a/tests/run-pass/ice-2865.rs b/tests/ui/crashes/ice-2865.rs index 64092afd53d..6b1ceb50569 100644 --- a/tests/run-pass/ice-2865.rs +++ b/tests/ui/crashes/ice-2865.rs @@ -1,4 +1,7 @@ #[allow(dead_code)] + +/// Test for https://github.com/rust-lang/rust-clippy/issues/2865 + struct Ice { size: String, } diff --git a/tests/run-pass/ice-3151.rs b/tests/ui/crashes/ice-3151.rs index a03dd05e7d3..fef4d7db84d 100644 --- a/tests/run-pass/ice-3151.rs +++ b/tests/ui/crashes/ice-3151.rs @@ -1,3 +1,5 @@ +/// Test for https://github.com/rust-lang/rust-clippy/issues/2865 + #[derive(Clone)] pub struct HashMap<V, S> { hash_builder: S, diff --git a/tests/run-pass/ice-3462.rs b/tests/ui/crashes/ice-3462.rs index d4f6f355c85..7d62e315da2 100644 --- a/tests/run-pass/ice-3462.rs +++ b/tests/ui/crashes/ice-3462.rs @@ -2,6 +2,8 @@ #![allow(clippy::blacklisted_name)] #![allow(unused)] +/// Test for https://github.com/rust-lang/rust-clippy/issues/3462 + enum Foo { Bar, Baz, diff --git a/tests/ui/crashes/ice-700.rs b/tests/ui/crashes/ice-700.rs new file mode 100644 index 00000000000..0cbceedbd6b --- /dev/null +++ b/tests/ui/crashes/ice-700.rs @@ -0,0 +1,9 @@ +#![deny(clippy::all)] + +/// Test for https://github.com/rust-lang/rust-clippy/issues/700 + +fn core() {} + +fn main() { + core(); +} diff --git a/tests/run-pass/ice_exacte_size.rs b/tests/ui/crashes/ice_exacte_size.rs index ac643fafabc..30e4b11ec0b 100644 --- a/tests/run-pass/ice_exacte_size.rs +++ b/tests/ui/crashes/ice_exacte_size.rs @@ -1,5 +1,7 @@ #![deny(clippy::all)] +/// Test for https://github.com/rust-lang/rust-clippy/issues/1336 + #[allow(dead_code)] struct Foo; diff --git a/tests/run-pass/if_same_then_else.rs b/tests/ui/crashes/if_same_then_else.rs index e6ab7cc9d8c..7b3b881316d 100644 --- a/tests/run-pass/if_same_then_else.rs +++ b/tests/ui/crashes/if_same_then_else.rs @@ -1,5 +1,7 @@ #![deny(clippy::if_same_then_else)] +/// Test for https://github.com/rust-lang/rust-clippy/issues/2426 + fn main() {} pub fn foo(a: i32, b: i32) -> Option<&'static str> { diff --git a/tests/run-pass/issue-2862.rs b/tests/ui/crashes/issue-2862.rs index b35df667f27..38e2341e278 100644 --- a/tests/run-pass/issue-2862.rs +++ b/tests/ui/crashes/issue-2862.rs @@ -1,3 +1,5 @@ +/// Test for https://github.com/rust-lang/rust-clippy/issues/2826 + pub trait FooMap { fn map<B, F: Fn() -> B>(&self, f: F) -> B; } diff --git a/tests/run-pass/issue-825.rs b/tests/ui/crashes/issue-825.rs index b1339212e6e..05696e3d7d5 100644 --- a/tests/run-pass/issue-825.rs +++ b/tests/ui/crashes/issue-825.rs @@ -1,5 +1,7 @@ #![allow(warnings)] +/// Test for https://github.com/rust-lang/rust-clippy/issues/825 + // this should compile in a reasonable amount of time fn rust_type_id(name: &str) { if "bool" == &name[..] diff --git a/tests/run-pass/issues_loop_mut_cond.rs b/tests/ui/crashes/issues_loop_mut_cond.rs index bb238c81ebc..bb238c81ebc 100644 --- a/tests/run-pass/issues_loop_mut_cond.rs +++ b/tests/ui/crashes/issues_loop_mut_cond.rs diff --git a/tests/run-pass/match_same_arms_const.rs b/tests/ui/crashes/match_same_arms_const.rs index 50732475562..94c939665e6 100644 --- a/tests/run-pass/match_same_arms_const.rs +++ b/tests/ui/crashes/match_same_arms_const.rs @@ -1,5 +1,7 @@ #![deny(clippy::match_same_arms)] +/// Test for https://github.com/rust-lang/rust-clippy/issues/2427 + const PRICE_OF_SWEETS: u32 = 5; const PRICE_OF_KINDNESS: u32 = 0; const PRICE_OF_DRINKS: u32 = 5; diff --git a/tests/run-pass/mut_mut_macro.rs b/tests/ui/crashes/mut_mut_macro.rs index af11c29d9b0..6ce3b37a855 100644 --- a/tests/run-pass/mut_mut_macro.rs +++ b/tests/ui/crashes/mut_mut_macro.rs @@ -1,14 +1,16 @@ #![deny(clippy::mut_mut, clippy::zero_ptr, clippy::cmp_nan)] #![allow(dead_code)] -// compiletest + extern crates doesn't work together -//#[macro_use] -//extern crate lazy_static; +// FIXME: compiletest + extern crates doesn't work together. To make this test work, it would need +// the following three lines and the lazy_static crate. +// +// #[macro_use] +// extern crate lazy_static; +// use std::collections::HashMap; -//use std::collections::HashMap; +/// ensure that we don't suggest `is_nan` and `is_null` inside constants +/// FIXME: once const fn is stable, suggest these functions again in constants -// ensure that we don't suggest `is_nan` and `is_null` inside constants -// FIXME: once const fn is stable, suggest these functions again in constants const BAA: *const i32 = 0 as *const i32; static mut BAR: *const i32 = BAA; static mut FOO: *const i32 = 0 as *const i32; diff --git a/tests/run-pass/needless_borrow_fp.rs b/tests/ui/crashes/needless_borrow_fp.rs index 4f61c76828d..4f61c76828d 100644 --- a/tests/run-pass/needless_borrow_fp.rs +++ b/tests/ui/crashes/needless_borrow_fp.rs diff --git a/tests/run-pass/needless_lifetimes_impl_trait.rs b/tests/ui/crashes/needless_lifetimes_impl_trait.rs index 676564b2445..676564b2445 100644 --- a/tests/run-pass/needless_lifetimes_impl_trait.rs +++ b/tests/ui/crashes/needless_lifetimes_impl_trait.rs diff --git a/tests/run-pass/procedural_macro.rs b/tests/ui/crashes/procedural_macro.rs index c7468493380..c7468493380 100644 --- a/tests/run-pass/procedural_macro.rs +++ b/tests/ui/crashes/procedural_macro.rs diff --git a/tests/run-pass/regressions.rs b/tests/ui/crashes/regressions.rs index 84470addd4a..84470addd4a 100644 --- a/tests/run-pass/regressions.rs +++ b/tests/ui/crashes/regressions.rs diff --git a/tests/run-pass/returns.rs b/tests/ui/crashes/returns.rs index d6b2a4ef170..8021ed4607d 100644 --- a/tests/run-pass/returns.rs +++ b/tests/ui/crashes/returns.rs @@ -1,3 +1,5 @@ +/// Test for https://github.com/rust-lang/rust-clippy/issues/1346 + #[deny(warnings)] fn cfg_return() -> i32 { #[cfg(unix)] diff --git a/tests/run-pass/single-match-else.rs b/tests/ui/crashes/single-match-else.rs index efcc6363eb0..1ba7ac08213 100644 --- a/tests/run-pass/single-match-else.rs +++ b/tests/ui/crashes/single-match-else.rs @@ -1,5 +1,7 @@ #![warn(clippy::single_match_else)] +//! Test for https://github.com/rust-lang/rust-clippy/issues/1588 + fn main() { let n = match (42, 43) { (42, n) => n, diff --git a/tests/run-pass/used_underscore_binding_macro.rs b/tests/ui/crashes/used_underscore_binding_macro.rs index 3030786aea6..3030786aea6 100644 --- a/tests/run-pass/used_underscore_binding_macro.rs +++ b/tests/ui/crashes/used_underscore_binding_macro.rs diff --git a/tests/run-pass/whitelist/clippy.toml b/tests/ui/crashes/whitelist/clippy.toml index 9f87de20baf..9f87de20baf 100644 --- a/tests/run-pass/whitelist/clippy.toml +++ b/tests/ui/crashes/whitelist/clippy.toml diff --git a/tests/run-pass/whitelist/conf_whitelisted.rs b/tests/ui/crashes/whitelist/conf_whitelisted.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-pass/whitelist/conf_whitelisted.rs +++ b/tests/ui/crashes/whitelist/conf_whitelisted.rs |
