Skip to content

Commit

Permalink
refactor "unnecessary else" diagnostic test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsemakula committed Feb 19, 2024
1 parent ff70310 commit 7dfeb2c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,12 @@ fn test2() {
}
"#,
);
check_diagnostics_with_disabled(
check_diagnostics(
r#"
fn test3() {
fn test3() -> u8 {
foo(if a { return 1 } else { 0 })
}
"#,
std::iter::once("E0308".to_owned()),
);
}
}

0 comments on commit 7dfeb2c

Please sign in to comment.