aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-18 13:04:49 +0100
committerGitHub <[email protected]>2020-08-18 13:04:49 +0100
commitb8dfc331abbfce6aad0c248c91c57bd9890a668f (patch)
tree0c03882f96663e970c9d08637f677f6b037ddf6c /crates/hir_def
parent2252a65f238cac0ebf0c4c56d9b475fa0460d758 (diff)
parent34847c8d96ddf98c40117ebacaecec38b9b758fc (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_def')
-rw-r--r--crates/hir_def/src/diagnostics.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/hir_def/src/diagnostics.rs b/crates/hir_def/src/diagnostics.rs
index 2e38a978f..c7723de00 100644
--- a/crates/hir_def/src/diagnostics.rs
+++ b/crates/hir_def/src/diagnostics.rs
@@ -15,6 +15,9 @@ pub struct UnresolvedModule {
15} 15}
16 16
17impl Diagnostic for UnresolvedModule { 17impl Diagnostic for UnresolvedModule {
18 fn name(&self) -> &'static str {
19 "unresolved-module"
20 }
18 fn message(&self) -> String { 21 fn message(&self) -> String {
19 "unresolved module".to_string() 22 "unresolved module".to_string()
20 } 23 }