diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-18 13:04:49 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-18 13:04:49 +0100 |
commit | b8dfc331abbfce6aad0c248c91c57bd9890a668f (patch) | |
tree | 0c03882f96663e970c9d08637f677f6b037ddf6c /crates/hir_expand/src | |
parent | 2252a65f238cac0ebf0c4c56d9b475fa0460d758 (diff) | |
parent | 34847c8d96ddf98c40117ebacaecec38b9b758fc (diff) |
Merge #5682
5682: Add an option to disable diagnostics r=matklad a=popzxc
As far as I know, currently it's not possible to disable a selected type of diagnostics provided by `rust-analyzer`.
This causes an inconvenient situation with a false-positive warnings: you either have to disable all the diagnostics, or you have to ignore these warnings.
There are some open issues related to this problem, e.g.: https://github.com/rust-analyzer/rust-analyzer/issues/5412, https://github.com/rust-analyzer/rust-analyzer/issues/5502
This PR attempts to make it possible to selectively disable some diagnostics on per-project basis.
Co-authored-by: Igor Aleksanov <[email protected]>
Diffstat (limited to 'crates/hir_expand/src')
-rw-r--r-- | crates/hir_expand/src/diagnostics.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/hir_expand/src/diagnostics.rs b/crates/hir_expand/src/diagnostics.rs index 59d35debe..6c81b2501 100644 --- a/crates/hir_expand/src/diagnostics.rs +++ b/crates/hir_expand/src/diagnostics.rs | |||
@@ -21,6 +21,7 @@ use syntax::SyntaxNodePtr; | |||
21 | use crate::InFile; | 21 | use crate::InFile; |
22 | 22 | ||
23 | pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static { | 23 | pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static { |
24 | fn name(&self) -> &'static str; | ||
24 | fn message(&self) -> String; | 25 | fn message(&self) -> String; |
25 | /// Used in highlighting and related purposes | 26 | /// Used in highlighting and related purposes |
26 | fn display_source(&self) -> InFile<SyntaxNodePtr>; | 27 | fn display_source(&self) -> InFile<SyntaxNodePtr>; |