Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 20fb334

Browse files
committed
Update no_default_features test due to new rustc diagnostic format
1 parent 5886910 commit 20fb334

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/client.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,10 +2084,12 @@ fn client_no_default_features() {
20842084

20852085
let diag = rls.wait_for_diagnostics();
20862086

2087-
assert_eq!(diag.diagnostics.len(), 1);
2088-
assert_eq!(diag.diagnostics[0].severity, Some(DiagnosticSeverity::Error));
2087+
let diagnostics: Vec<_> =
2088+
diag.diagnostics.iter().filter(|d| d.severity == Some(DiagnosticSeverity::Error)).collect();
2089+
assert_eq!(diagnostics.len(), 1);
2090+
assert_eq!(diagnostics[0].severity, Some(DiagnosticSeverity::Error));
20892091
let msg = "cannot find struct, variant or union type `Baz` in this scope";
2090-
assert!(diag.diagnostics[0].message.contains(msg));
2092+
assert!(diagnostics[0].message.contains(msg));
20912093
}
20922094

20932095
#[test]

0 commit comments

Comments
 (0)