mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Remove redundant tests
This commit is contained in:
parent
c256a72b03
commit
590aed2eec
1 changed files with 5 additions and 63 deletions
|
@ -3600,46 +3600,6 @@ fn no_such_field_diagnostics() {
|
|||
mod branching_with_never_tests {
|
||||
use super::type_at;
|
||||
|
||||
#[test]
|
||||
fn match_first_arm_never() {
|
||||
let t = type_at(
|
||||
r#"
|
||||
//- /main.rs
|
||||
fn test(a: i32) {
|
||||
let i = match a {
|
||||
1 => return,
|
||||
2 => 2.0,
|
||||
3 => loop {},
|
||||
_ => 3.0,
|
||||
};
|
||||
i<|>
|
||||
()
|
||||
}
|
||||
"#,
|
||||
);
|
||||
assert_eq!(t, "f64");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn match_second_block_arm_never() {
|
||||
let t = type_at(
|
||||
r#"
|
||||
//- /main.rs
|
||||
fn test(a: i32) {
|
||||
let i = match a {
|
||||
1 => { 3.0 },
|
||||
2 => { loop {} },
|
||||
3 => { 3.0 },
|
||||
_ => { return },
|
||||
};
|
||||
i<|>
|
||||
()
|
||||
}
|
||||
"#,
|
||||
);
|
||||
assert_eq!(t, "f64");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn if_never() {
|
||||
let t = type_at(
|
||||
|
@ -3679,16 +3639,16 @@ fn test(input: bool) {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn match_first_block_arm_never() {
|
||||
fn match_first_arm_never() {
|
||||
let t = type_at(
|
||||
r#"
|
||||
//- /main.rs
|
||||
fn test(a: i32) {
|
||||
let i = match a {
|
||||
1 => { return },
|
||||
2 => { 2.0 },
|
||||
3 => { loop {} },
|
||||
_ => { 3.0 },
|
||||
1 => return,
|
||||
2 => 2.0,
|
||||
3 => loop {},
|
||||
_ => 3.0,
|
||||
};
|
||||
i<|>
|
||||
()
|
||||
|
@ -3736,24 +3696,6 @@ fn test(a: i32) {
|
|||
assert_eq!(t, "!");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn match_all_block_arms_never() {
|
||||
let t = type_at(
|
||||
r#"
|
||||
//- /main.rs
|
||||
fn test(a: i32) {
|
||||
let i = match a {
|
||||
2 => { return },
|
||||
_ => { loop {} },
|
||||
};
|
||||
i<|>
|
||||
()
|
||||
}
|
||||
"#,
|
||||
);
|
||||
assert_eq!(t, "!");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn match_no_never_arms() {
|
||||
let t = type_at(
|
||||
|
|
Loading…
Reference in a new issue