mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
internal: make check_diagnostics_with_disabled more ergonomic
This commit is contained in:
parent
e6b96dba56
commit
d818b531c9
6 changed files with 15 additions and 18 deletions
|
@ -198,12 +198,9 @@ pub(crate) fn check_diagnostics(ra_fixture: &str) {
|
|||
}
|
||||
|
||||
#[track_caller]
|
||||
pub(crate) fn check_diagnostics_with_disabled(
|
||||
ra_fixture: &str,
|
||||
disabled: impl Iterator<Item = String>,
|
||||
) {
|
||||
pub(crate) fn check_diagnostics_with_disabled(ra_fixture: &str, disabled: &[&str]) {
|
||||
let mut config = DiagnosticsConfig::test_sample();
|
||||
config.disabled.extend(disabled);
|
||||
config.disabled.extend(disabled.into_iter().map(|&s| s.to_owned()));
|
||||
check_diagnostics_with_config(config, ra_fixture)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue