mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
incorrect case diagnostics for trait assoc functions and consts
This commit is contained in:
parent
5fe3b75677
commit
6d2d6323ac
4 changed files with 32 additions and 6 deletions
|
@ -89,6 +89,16 @@ pub(crate) fn check_diagnostics(ra_fixture: &str) {
|
|||
check_diagnostics_with_config(config, ra_fixture)
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
pub(crate) fn check_diagnostics_with_disabled(
|
||||
ra_fixture: &str,
|
||||
disabled: impl Iterator<Item = String>,
|
||||
) {
|
||||
let mut config = DiagnosticsConfig::test_sample();
|
||||
config.disabled.extend(disabled);
|
||||
check_diagnostics_with_config(config, ra_fixture)
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
pub(crate) fn check_diagnostics_with_config(config: DiagnosticsConfig, ra_fixture: &str) {
|
||||
let (db, files) = RootDatabase::with_many_files(ra_fixture);
|
||||
|
@ -175,6 +185,7 @@ fn minicore_smoke_test() {
|
|||
let mut config = DiagnosticsConfig::test_sample();
|
||||
// This should be ignored since we conditionally remove code which creates single item use with braces
|
||||
config.disabled.insert("unused_braces".to_string());
|
||||
config.disabled.insert("unused_variables".to_string());
|
||||
check_diagnostics_with_config(config, &source);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue