/// All crates used in UI tests are listed here
static TEST_DEPENDENCIES: &[&str] = &[
+ "clap",
"clippy_utils",
"derive_new",
"futures",
// 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()
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",
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