diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-24 18:39:31 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-24 18:39:31 +0000 |
commit | b65ba8f1d62c2961e520885117056e405056959d (patch) | |
tree | 8b4b48b4e24c2b7fcf81ddc196586efd684a3c66 /crates/ra_analysis/src/imp.rs | |
parent | 67e768466ff2e2611eead0f30b2e9c4083c80c20 (diff) | |
parent | 0fb8894fbe3c2ea9f4be34065c3bd1b2a64f6356 (diff) |
Merge #326
326: resolved #324: remove unnecessary braces in use statement. r=matklad a=gfreezy
Add inspection for unnecessary braces in use statement
Co-authored-by: gfreezy <[email protected]>
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 40996bfd7..a547c5a20 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -3,7 +3,7 @@ use std::{ | |||
3 | sync::Arc, | 3 | sync::Arc, |
4 | }; | 4 | }; |
5 | 5 | ||
6 | use ra_editor::{self, find_node_at_offset, FileSymbol, LineIndex, LocalEdit}; | 6 | use ra_editor::{self, find_node_at_offset, FileSymbol, LineIndex, LocalEdit, Severity}; |
7 | use ra_syntax::{ | 7 | use ra_syntax::{ |
8 | ast::{self, ArgListOwner, Expr, NameOwner, FnDef}, | 8 | ast::{self, ArgListOwner, Expr, NameOwner, FnDef}, |
9 | algo::find_covering_node, | 9 | algo::find_covering_node, |
@@ -365,6 +365,7 @@ impl AnalysisImpl { | |||
365 | .map(|d| Diagnostic { | 365 | .map(|d| Diagnostic { |
366 | range: d.range, | 366 | range: d.range, |
367 | message: d.msg, | 367 | message: d.msg, |
368 | severity: d.severity, | ||
368 | fix: None, | 369 | fix: None, |
369 | }) | 370 | }) |
370 | .collect::<Vec<_>>(); | 371 | .collect::<Vec<_>>(); |
@@ -386,6 +387,7 @@ impl AnalysisImpl { | |||
386 | Diagnostic { | 387 | Diagnostic { |
387 | range: name_node.range(), | 388 | range: name_node.range(), |
388 | message: "unresolved module".to_string(), | 389 | message: "unresolved module".to_string(), |
390 | severity: Severity::Error, | ||
389 | fix: Some(fix), | 391 | fix: Some(fix), |
390 | } | 392 | } |
391 | } | 393 | } |
@@ -408,6 +410,7 @@ impl AnalysisImpl { | |||
408 | Diagnostic { | 410 | Diagnostic { |
409 | range: name_node.range(), | 411 | range: name_node.range(), |
410 | message: "can't declare module at this location".to_string(), | 412 | message: "can't declare module at this location".to_string(), |
413 | severity: Severity::Error, | ||
411 | fix: Some(fix), | 414 | fix: Some(fix), |
412 | } | 415 | } |
413 | } | 416 | } |