Skip to content

Commit b46f378

Browse files
committed
update: filter out syntax error in test
1 parent cab9148 commit b46f378

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

crates/ide-diagnostics/src/handlers/missing_match_arms.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ pub(crate) fn missing_match_arms(
1717

1818
#[cfg(test)]
1919
mod tests {
20-
use crate::tests::check_diagnostics;
20+
use crate::{
21+
tests::{check_diagnostics, check_diagnostics_with_config},
22+
DiagnosticsConfig,
23+
};
2124

2225
#[track_caller]
2326
fn check_diagnostics_no_bails(ra_fixture: &str) {
@@ -27,11 +30,13 @@ mod tests {
2730

2831
#[test]
2932
fn empty_body() {
30-
check_diagnostics_no_bails(
33+
let mut config = DiagnosticsConfig::test_sample();
34+
config.disabled.insert("syntax-error".to_string());
35+
check_diagnostics_with_config(
36+
config,
3137
r#"
3238
fn main() {
3339
match 0;
34-
//^ error: Syntax Error: expected `{`
3540
}
3641
"#,
3742
);

0 commit comments

Comments
 (0)