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 <popzxc@yandex.ru>
This commit is contained in:
bors[bot] 2020-08-18 12:04:49 +00:00 committed by GitHub
commit b8dfc331ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 155 additions and 15 deletions

View file

@ -15,6 +15,9 @@ pub struct UnresolvedModule {
}
impl Diagnostic for UnresolvedModule {
fn name(&self) -> &'static str {
"unresolved-module"
}
fn message(&self) -> String {
"unresolved module".to_string()
}