aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_analysis/src/imp.rs6
-rw-r--r--crates/ra_analysis/src/lib.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs4
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs2
4 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs
index e8d6acc17..00cdf7eff 100644
--- a/crates/ra_analysis/src/imp.rs
+++ b/crates/ra_analysis/src/imp.rs
@@ -364,7 +364,7 @@ impl AnalysisImpl {
364 .map(|d| Diagnostic { 364 .map(|d| Diagnostic {
365 range: d.range, 365 range: d.range,
366 message: d.msg, 366 message: d.msg,
367 severity: Some(d.severity), 367 severity: d.severity,
368 fix: None, 368 fix: None,
369 }) 369 })
370 .collect::<Vec<_>>(); 370 .collect::<Vec<_>>();
@@ -386,7 +386,7 @@ impl AnalysisImpl {
386 Diagnostic { 386 Diagnostic {
387 range: name_node.range(), 387 range: name_node.range(),
388 message: "unresolved module".to_string(), 388 message: "unresolved module".to_string(),
389 severity: Some(Severity::Error), 389 severity: Severity::Error,
390 fix: Some(fix), 390 fix: Some(fix),
391 } 391 }
392 } 392 }
@@ -409,7 +409,7 @@ impl AnalysisImpl {
409 Diagnostic { 409 Diagnostic {
410 range: name_node.range(), 410 range: name_node.range(),
411 message: "can't declare module at this location".to_string(), 411 message: "can't declare module at this location".to_string(),
412 severity: Some(Severity::Error), 412 severity: Severity::Error,
413 fix: Some(fix), 413 fix: Some(fix),
414 } 414 }
415 } 415 }
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs
index a213fd60f..fbb19ed6b 100644
--- a/crates/ra_analysis/src/lib.rs
+++ b/crates/ra_analysis/src/lib.rs
@@ -197,7 +197,7 @@ pub struct Diagnostic {
197 pub message: String, 197 pub message: String,
198 pub range: TextRange, 198 pub range: TextRange,
199 pub fix: Option<SourceChange>, 199 pub fix: Option<SourceChange>,
200 pub severity: Option<Severity>, 200 pub severity: Severity,
201} 201}
202 202
203#[derive(Debug)] 203#[derive(Debug)]
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index 565ec92af..c0c414db0 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -13,7 +13,7 @@ use gen_lsp_server::{
13}; 13};
14use languageserver_types::NumberOrString; 14use languageserver_types::NumberOrString;
15use ra_analysis::{Canceled, FileId, LibraryData}; 15use ra_analysis::{Canceled, FileId, LibraryData};
16use ra_vfs::{VfsTask}; 16use ra_vfs::VfsTask;
17use rayon; 17use rayon;
18use threadpool::ThreadPool; 18use threadpool::ThreadPool;
19use rustc_hash::FxHashSet; 19use rustc_hash::FxHashSet;
@@ -23,7 +23,7 @@ use failure_derive::Fail;
23 23
24use crate::{ 24use crate::{
25 main_loop::subscriptions::Subscriptions, 25 main_loop::subscriptions::Subscriptions,
26 project_model::{workspace_loader}, 26 project_model::workspace_loader,
27 req, 27 req,
28 server_world::{ServerWorld, ServerWorldState}, 28 server_world::{ServerWorld, ServerWorldState},
29 Result, 29 Result,
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 8e859e8d4..658d169cd 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -650,7 +650,7 @@ pub fn publish_diagnostics(
650 .into_iter() 650 .into_iter()
651 .map(|d| Diagnostic { 651 .map(|d| Diagnostic {
652 range: d.range.conv_with(&line_index), 652 range: d.range.conv_with(&line_index),
653 severity: d.severity.map(to_diagnostic_severity), 653 severity: Some(to_diagnostic_severity(d.severity)),
654 code: None, 654 code: None,
655 source: Some("rust-analyzer".to_string()), 655 source: Some("rust-analyzer".to_string()),
656 message: d.message, 656 message: d.message,