diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-24 21:18:01 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-24 21:18:01 +0100 |
commit | d7f1a53c6c1238828276a44866c2376588f435aa (patch) | |
tree | e41e3bc6ba72922d983ae8ae4db0ddc571925f5a /crates/ra_ide/src/lib.rs | |
parent | 75e67ee74e5d3db5363732bb793b872c57408013 (diff) | |
parent | 92a4ec80a0ce1dd834578f53ea3fd018530ec0e6 (diff) |
Merge #5524
5524: Allow opting out of experimental diagnostics like MismatchedArgCount r=matklad a=jonas-schievink
Closes https://github.com/rust-analyzer/rust-analyzer/issues/5448
Closes https://github.com/rust-analyzer/rust-analyzer/issues/5419
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r-- | crates/ra_ide/src/lib.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index 7356e947b..4c4d9f6fa 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs | |||
@@ -487,8 +487,12 @@ impl Analysis { | |||
487 | } | 487 | } |
488 | 488 | ||
489 | /// Computes the set of diagnostics for the given file. | 489 | /// Computes the set of diagnostics for the given file. |
490 | pub fn diagnostics(&self, file_id: FileId) -> Cancelable<Vec<Diagnostic>> { | 490 | pub fn diagnostics( |
491 | self.with_db(|db| diagnostics::diagnostics(db, file_id)) | 491 | &self, |
492 | file_id: FileId, | ||
493 | enable_experimental: bool, | ||
494 | ) -> Cancelable<Vec<Diagnostic>> { | ||
495 | self.with_db(|db| diagnostics::diagnostics(db, file_id, enable_experimental)) | ||
492 | } | 496 | } |
493 | 497 | ||
494 | /// Returns the edit required to rename reference at the position to the new | 498 | /// Returns the edit required to rename reference at the position to the new |