From b545f1c3bbe344e3d2e6f71f51152c1bd9b3bdfe Mon Sep 17 00:00:00 2001
From: Philipp Hansch <dev@phansch.net>
Date: Fri, 5 Apr 2019 07:22:36 +0200
Subject: [PATCH] Add missing `// run-pass` annotations to ICE tests

compiletest UI tests do not fail when encountering panics and ICEs
unless the `// run-pass` flag is used.

(This was forgotten in https://github.com/rust-lang/rust-clippy/pull/3743)
---
 tests/ui/crashes/associated-constant-ice.rs       | 2 ++
 tests/ui/crashes/cc_seme.rs                       | 2 ++
 tests/ui/crashes/enum-glob-import-crate.rs        | 2 ++
 tests/ui/crashes/ice-1588.rs                      | 2 ++
 tests/ui/crashes/ice-1782.rs                      | 2 ++
 tests/ui/crashes/ice-1969.rs                      | 2 ++
 tests/ui/crashes/ice-2499.rs                      | 2 ++
 tests/ui/crashes/ice-2594.rs                      | 2 ++
 tests/ui/crashes/ice-2727.rs                      | 2 ++
 tests/ui/crashes/ice-2760.rs                      | 2 ++
 tests/ui/crashes/ice-2774.rs                      | 2 ++
 tests/ui/crashes/ice-2865.rs                      | 2 ++
 tests/ui/crashes/ice-3151.rs                      | 2 ++
 tests/ui/crashes/ice-3462.rs                      | 2 ++
 tests/ui/crashes/ice-3747.rs                      | 2 ++
 tests/ui/crashes/ice-700.rs                       | 2 ++
 tests/ui/crashes/ice_exacte_size.rs               | 2 ++
 tests/ui/crashes/if_same_then_else.rs             | 2 ++
 tests/ui/crashes/issue-2862.rs                    | 2 ++
 tests/ui/crashes/issue-825.rs                     | 2 ++
 tests/ui/crashes/issues_loop_mut_cond.rs          | 2 ++
 tests/ui/crashes/match_same_arms_const.rs         | 2 ++
 tests/ui/crashes/mut_mut_macro.rs                 | 2 ++
 tests/ui/crashes/needless_borrow_fp.rs            | 2 ++
 tests/ui/crashes/needless_lifetimes_impl_trait.rs | 2 ++
 tests/ui/crashes/procedural_macro.rs              | 2 ++
 tests/ui/crashes/regressions.rs                   | 2 ++
 tests/ui/crashes/returns.rs                       | 2 ++
 tests/ui/crashes/single-match-else.rs             | 2 ++
 tests/ui/crashes/used_underscore_binding_macro.rs | 2 ++
 30 files changed, 60 insertions(+)

diff --git a/tests/ui/crashes/associated-constant-ice.rs b/tests/ui/crashes/associated-constant-ice.rs
index 948deba3ea6..4bb833795bb 100644
--- a/tests/ui/crashes/associated-constant-ice.rs
+++ b/tests/ui/crashes/associated-constant-ice.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 /// Test for https://github.com/rust-lang/rust-clippy/issues/1698
 
 pub trait Trait {
diff --git a/tests/ui/crashes/cc_seme.rs b/tests/ui/crashes/cc_seme.rs
index 98588be9cf8..c48c7e9e6c6 100644
--- a/tests/ui/crashes/cc_seme.rs
+++ b/tests/ui/crashes/cc_seme.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #[allow(dead_code)]
 
 /// Test for https://github.com/rust-lang/rust-clippy/issues/478
diff --git a/tests/ui/crashes/enum-glob-import-crate.rs b/tests/ui/crashes/enum-glob-import-crate.rs
index dca32aa3b56..db1fa871afe 100644
--- a/tests/ui/crashes/enum-glob-import-crate.rs
+++ b/tests/ui/crashes/enum-glob-import-crate.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![deny(clippy::all)]
 #![allow(unused_imports)]
 
diff --git a/tests/ui/crashes/ice-1588.rs b/tests/ui/crashes/ice-1588.rs
index b0a3d11bce4..15d0f705b36 100644
--- a/tests/ui/crashes/ice-1588.rs
+++ b/tests/ui/crashes/ice-1588.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(clippy::all)]
 
 /// Test for https://github.com/rust-lang/rust-clippy/issues/1588
diff --git a/tests/ui/crashes/ice-1782.rs b/tests/ui/crashes/ice-1782.rs
index 81af88962a6..1ca6b6976b3 100644
--- a/tests/ui/crashes/ice-1782.rs
+++ b/tests/ui/crashes/ice-1782.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(dead_code, unused_variables)]
 
 /// Should not trigger an ICE in `SpanlessEq` / `consts::constant`
diff --git a/tests/ui/crashes/ice-1969.rs b/tests/ui/crashes/ice-1969.rs
index 96a8fe6c24d..837ec9df31a 100644
--- a/tests/ui/crashes/ice-1969.rs
+++ b/tests/ui/crashes/ice-1969.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(clippy::all)]
 
 /// Test for https://github.com/rust-lang/rust-clippy/issues/1969
diff --git a/tests/ui/crashes/ice-2499.rs b/tests/ui/crashes/ice-2499.rs
index 45b3b1869dd..ffef1631775 100644
--- a/tests/ui/crashes/ice-2499.rs
+++ b/tests/ui/crashes/ice-2499.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(dead_code, clippy::char_lit_as_u8, clippy::needless_bool)]
 
 /// Should not trigger an ICE in `SpanlessHash` / `consts::constant`
diff --git a/tests/ui/crashes/ice-2594.rs b/tests/ui/crashes/ice-2594.rs
index 3f3986b6fc6..ac19f1976e9 100644
--- a/tests/ui/crashes/ice-2594.rs
+++ b/tests/ui/crashes/ice-2594.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(dead_code, unused_variables)]
 
 /// Should not trigger an ICE in `SpanlessHash` / `consts::constant`
diff --git a/tests/ui/crashes/ice-2727.rs b/tests/ui/crashes/ice-2727.rs
index 56024abc8f5..d832c286033 100644
--- a/tests/ui/crashes/ice-2727.rs
+++ b/tests/ui/crashes/ice-2727.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 /// Test for https://github.com/rust-lang/rust-clippy/issues/2727
 
 pub fn f(new: fn()) {
diff --git a/tests/ui/crashes/ice-2760.rs b/tests/ui/crashes/ice-2760.rs
index f1a229f3f4f..9e5e299c336 100644
--- a/tests/ui/crashes/ice-2760.rs
+++ b/tests/ui/crashes/ice-2760.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(
     unused_variables,
     clippy::blacklisted_name,
diff --git a/tests/ui/crashes/ice-2774.rs b/tests/ui/crashes/ice-2774.rs
index d44b0fae820..47f8e3b18ee 100644
--- a/tests/ui/crashes/ice-2774.rs
+++ b/tests/ui/crashes/ice-2774.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 use std::collections::HashSet;
 
 // See rust-lang/rust-clippy#2774.
diff --git a/tests/ui/crashes/ice-2865.rs b/tests/ui/crashes/ice-2865.rs
index 6b1ceb50569..c4f6c0fed68 100644
--- a/tests/ui/crashes/ice-2865.rs
+++ b/tests/ui/crashes/ice-2865.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #[allow(dead_code)]
 
 /// Test for https://github.com/rust-lang/rust-clippy/issues/2865
diff --git a/tests/ui/crashes/ice-3151.rs b/tests/ui/crashes/ice-3151.rs
index fef4d7db84d..ffad2d06b56 100644
--- a/tests/ui/crashes/ice-3151.rs
+++ b/tests/ui/crashes/ice-3151.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 /// Test for https://github.com/rust-lang/rust-clippy/issues/2865
 
 #[derive(Clone)]
diff --git a/tests/ui/crashes/ice-3462.rs b/tests/ui/crashes/ice-3462.rs
index 7d62e315da2..95c7dff9be3 100644
--- a/tests/ui/crashes/ice-3462.rs
+++ b/tests/ui/crashes/ice-3462.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![warn(clippy::all)]
 #![allow(clippy::blacklisted_name)]
 #![allow(unused)]
diff --git a/tests/ui/crashes/ice-3747.rs b/tests/ui/crashes/ice-3747.rs
index cdf018cbc88..d0b44ebafee 100644
--- a/tests/ui/crashes/ice-3747.rs
+++ b/tests/ui/crashes/ice-3747.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 /// Test for https://github.com/rust-lang/rust-clippy/issues/3747
 
 macro_rules! a {
diff --git a/tests/ui/crashes/ice-700.rs b/tests/ui/crashes/ice-700.rs
index 0cbceedbd6b..b06df83d51a 100644
--- a/tests/ui/crashes/ice-700.rs
+++ b/tests/ui/crashes/ice-700.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![deny(clippy::all)]
 
 /// Test for https://github.com/rust-lang/rust-clippy/issues/700
diff --git a/tests/ui/crashes/ice_exacte_size.rs b/tests/ui/crashes/ice_exacte_size.rs
index 30e4b11ec0b..e02eb28ab86 100644
--- a/tests/ui/crashes/ice_exacte_size.rs
+++ b/tests/ui/crashes/ice_exacte_size.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![deny(clippy::all)]
 
 /// Test for https://github.com/rust-lang/rust-clippy/issues/1336
diff --git a/tests/ui/crashes/if_same_then_else.rs b/tests/ui/crashes/if_same_then_else.rs
index 7b3b881316d..b2a4d541f59 100644
--- a/tests/ui/crashes/if_same_then_else.rs
+++ b/tests/ui/crashes/if_same_then_else.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![deny(clippy::if_same_then_else)]
 
 /// Test for https://github.com/rust-lang/rust-clippy/issues/2426
diff --git a/tests/ui/crashes/issue-2862.rs b/tests/ui/crashes/issue-2862.rs
index 38e2341e278..3587a08eab7 100644
--- a/tests/ui/crashes/issue-2862.rs
+++ b/tests/ui/crashes/issue-2862.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 /// Test for https://github.com/rust-lang/rust-clippy/issues/2826
 
 pub trait FooMap {
diff --git a/tests/ui/crashes/issue-825.rs b/tests/ui/crashes/issue-825.rs
index 05696e3d7d5..3d4a88ab3c4 100644
--- a/tests/ui/crashes/issue-825.rs
+++ b/tests/ui/crashes/issue-825.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(warnings)]
 
 /// Test for https://github.com/rust-lang/rust-clippy/issues/825
diff --git a/tests/ui/crashes/issues_loop_mut_cond.rs b/tests/ui/crashes/issues_loop_mut_cond.rs
index bb238c81ebc..c4acd5cda1b 100644
--- a/tests/ui/crashes/issues_loop_mut_cond.rs
+++ b/tests/ui/crashes/issues_loop_mut_cond.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(dead_code)]
 
 /// Issue: https://github.com/rust-lang/rust-clippy/issues/2596
diff --git a/tests/ui/crashes/match_same_arms_const.rs b/tests/ui/crashes/match_same_arms_const.rs
index 94c939665e6..848f0ea52ca 100644
--- a/tests/ui/crashes/match_same_arms_const.rs
+++ b/tests/ui/crashes/match_same_arms_const.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![deny(clippy::match_same_arms)]
 
 /// Test for https://github.com/rust-lang/rust-clippy/issues/2427
diff --git a/tests/ui/crashes/mut_mut_macro.rs b/tests/ui/crashes/mut_mut_macro.rs
index 6ce3b37a855..14219f574c5 100644
--- a/tests/ui/crashes/mut_mut_macro.rs
+++ b/tests/ui/crashes/mut_mut_macro.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![deny(clippy::mut_mut, clippy::zero_ptr, clippy::cmp_nan)]
 #![allow(dead_code)]
 
diff --git a/tests/ui/crashes/needless_borrow_fp.rs b/tests/ui/crashes/needless_borrow_fp.rs
index 4f61c76828d..48507efe1e9 100644
--- a/tests/ui/crashes/needless_borrow_fp.rs
+++ b/tests/ui/crashes/needless_borrow_fp.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #[deny(clippy::all)]
 #[derive(Debug)]
 pub enum Error {
diff --git a/tests/ui/crashes/needless_lifetimes_impl_trait.rs b/tests/ui/crashes/needless_lifetimes_impl_trait.rs
index 676564b2445..bd1fa4a0b1e 100644
--- a/tests/ui/crashes/needless_lifetimes_impl_trait.rs
+++ b/tests/ui/crashes/needless_lifetimes_impl_trait.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![deny(clippy::needless_lifetimes)]
 #![allow(dead_code)]
 
diff --git a/tests/ui/crashes/procedural_macro.rs b/tests/ui/crashes/procedural_macro.rs
index c7468493380..f79d9ab6460 100644
--- a/tests/ui/crashes/procedural_macro.rs
+++ b/tests/ui/crashes/procedural_macro.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #[macro_use]
 extern crate clippy_mini_macro_test;
 
diff --git a/tests/ui/crashes/regressions.rs b/tests/ui/crashes/regressions.rs
index 84470addd4a..623ae51f9f0 100644
--- a/tests/ui/crashes/regressions.rs
+++ b/tests/ui/crashes/regressions.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(clippy::blacklisted_name)]
 
 pub fn foo(bar: *const u8) {
diff --git a/tests/ui/crashes/returns.rs b/tests/ui/crashes/returns.rs
index 8021ed4607d..f2153efc388 100644
--- a/tests/ui/crashes/returns.rs
+++ b/tests/ui/crashes/returns.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 /// Test for https://github.com/rust-lang/rust-clippy/issues/1346
 
 #[deny(warnings)]
diff --git a/tests/ui/crashes/single-match-else.rs b/tests/ui/crashes/single-match-else.rs
index 1ba7ac08213..3a4bbe310cc 100644
--- a/tests/ui/crashes/single-match-else.rs
+++ b/tests/ui/crashes/single-match-else.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![warn(clippy::single_match_else)]
 
 //! Test for https://github.com/rust-lang/rust-clippy/issues/1588
diff --git a/tests/ui/crashes/used_underscore_binding_macro.rs b/tests/ui/crashes/used_underscore_binding_macro.rs
index 6d2124c12fe..265017c51d9 100644
--- a/tests/ui/crashes/used_underscore_binding_macro.rs
+++ b/tests/ui/crashes/used_underscore_binding_macro.rs
@@ -1,3 +1,5 @@
+// run-pass
+
 #![allow(clippy::useless_attribute)] //issue #2910
 
 #[macro_use]