Ignore crashes dir

This commit is contained in:
Samuel E. Moelius III 2022-05-27 16:38:28 -04:00
parent 8f49e4127f
commit 6027255eb2
10 changed files with 6 additions and 38 deletions

View File

@ -345,8 +345,6 @@ fn compile_test() {
"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 +386,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

View File

@ -1,12 +0,0 @@
// run-rustfix
#![allow(dead_code)]
#[derive(Default)]
struct A<T> {
a: Vec<A<T>>,
b: T,
}
fn main() {
if Ok::<_, ()>(A::<String>::default()).is_ok() {}
}

View File

@ -1,6 +1,3 @@
// run-rustfix
#![allow(dead_code)]
#[derive(Default)]
struct A<T> {
a: Vec<A<T>>,

View File

@ -1,5 +1,5 @@
error: redundant pattern matching, consider using `is_ok()`
--> $DIR/ice-7169.rs:11:12
--> $DIR/ice-7169.rs:8:12
|
LL | if let Ok(_) = Ok::<_, ()>(A::<String>::default()) {}
| -------^^^^^-------------------------------------- help: try this: `if Ok::<_, ()>(A::<String>::default()).is_ok()`

View File

@ -1,7 +0,0 @@
// run-rustfix
fn _f(s: &str) -> Option<()> {
let _ = s[1..].split('.').next()?;
Some(())
}
fn main() {}

View File

@ -1,4 +1,3 @@
// run-rustfix
fn _f(s: &str) -> Option<()> {
let _ = s[1..].splitn(2, '.').next()?;
Some(())

View File

@ -1,5 +1,5 @@
error: unnecessary use of `splitn`
--> $DIR/ice-8250.rs:3:13
--> $DIR/ice-8250.rs:2:13
|
LL | let _ = s[1..].splitn(2, '.').next()?;
| ^^^^^^^^^^^^^^^^^^^^^ help: try this: `s[1..].split('.')`

View File

@ -1,9 +0,0 @@
// run-rustfix
#![warn(clippy::let_unit_value)]
fn f() {}
static FN: fn() = f;
fn main() {
FN();
}

View File

@ -1,4 +1,3 @@
// run-rustfix
#![warn(clippy::let_unit_value)]
fn f() {}

View File

@ -1,5 +1,5 @@
error: this let-binding has unit value
--> $DIR/ice-8821.rs:8:5
--> $DIR/ice-8821.rs:7:5
|
LL | let _: () = FN();
| ^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `FN();`