]> git.lizzy.rs Git - rust.git/blobdiff - tests/compile-test.rs
Auto merge of #9023 - unvalley:add-meta-tag-for-lint-list, r=xFrednet
[rust.git] / tests / compile-test.rs
index 4f17e7ffbc299f424b559ac34f16717bbd680445..7d2198357232453732b111cd16f5983f3999e049 100644 (file)
@@ -23,6 +23,7 @@
 
 /// All crates used in UI tests are listed here
 static TEST_DEPENDENCIES: &[&str] = &[
+    "clap",
     "clippy_utils",
     "derive_new",
     "futures",
@@ -41,6 +42,8 @@
 // Test dependencies may need an `extern crate` here to ensure that they show up
 // in the depinfo file (otherwise cargo thinks they are unused)
 #[allow(unused_extern_crates)]
+extern crate clap;
+#[allow(unused_extern_crates)]
 extern crate clippy_utils;
 #[allow(unused_extern_crates)]
 extern crate derive_new;
         not_found.is_empty(),
         "dependencies not found in depinfo: {:?}\n\
         help: Make sure the `-Z binary-dep-depinfo` rust flag is enabled\n\
-        help: Try adding to dev-dependencies in Cargo.toml",
-        not_found
+        help: Try adding to dev-dependencies in Cargo.toml\n\
+        help: Be sure to also add `extern crate ...;` to tests/compile-test.rs",
+        not_found,
     );
     crates
         .into_iter()
@@ -342,11 +346,10 @@ fn compile_test() {
 
 const RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS: &[&str] = &[
     "assign_ops2.rs",
+    "borrow_deref_ref_unfixable.rs",
     "cast_size_32bit.rs",
     "char_lit_as_u8.rs",
     "cmp_owned/without_suggestion.rs",
-    "crashes/ice-6250.rs",
-    "crashes/ice-6251.rs",
     "dbg_macro.rs",
     "deref_addrof_double_trigger.rs",
     "doc/unbalanced_ticks.rs",
@@ -388,6 +391,9 @@ fn check_rustfix_coverage() {
         assert!(RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS.iter().is_sorted_by_key(Path::new));
 
         for rs_path in missing_coverage_contents.lines() {
+            if Path::new(rs_path).starts_with("tests/ui/crashes") {
+                continue;
+            }
             let filename = Path::new(rs_path).strip_prefix("tests/ui/").unwrap();
             assert!(
                 RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS