mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Don't show unresolved-field
diagnostic for missing names
This commit is contained in:
parent
e95644e279
commit
827a0530bc
3 changed files with 27 additions and 1 deletions
|
@ -68,7 +68,10 @@ fn method_fix(
|
|||
}
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::tests::check_diagnostics;
|
||||
use crate::{
|
||||
tests::{check_diagnostics, check_diagnostics_with_config},
|
||||
DiagnosticsConfig,
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn smoke_test() {
|
||||
|
@ -146,4 +149,11 @@ fn foo() {
|
|||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_diagnostic_for_missing_name() {
|
||||
let mut config = DiagnosticsConfig::test_sample();
|
||||
config.disabled.insert("syntax-error".to_owned());
|
||||
check_diagnostics_with_config(config, "fn foo() { (). }");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue