diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
commit | cacdb0eab8131bfb945eb7ed0150c92ec56eefe2 (patch) | |
tree | f762de90ce813591bc640ae0bce36493a3dcafa9 /crates/ra_ide_api/src/diagnostics.rs | |
parent | 4e8664d9d37021e85d72b6228fa45e7edf4a1a74 (diff) | |
parent | 1834bae5b86c54ed9dece26e82436919d59e6cb7 (diff) |
Merge #1486
1486: allow rustfmt to reorder imports r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/diagnostics.rs')
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 35b3d77df..9ab455b0e 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -1,17 +1,20 @@ | |||
1 | use std::cell::RefCell; | 1 | use std::cell::RefCell; |
2 | 2 | ||
3 | use hir::{ | ||
4 | diagnostics::{Diagnostic as _, DiagnosticSink}, | ||
5 | source_binder, | ||
6 | }; | ||
3 | use itertools::Itertools; | 7 | use itertools::Itertools; |
4 | use hir::{source_binder, diagnostics::{Diagnostic as _, DiagnosticSink}}; | 8 | use ra_assists::ast_editor::{AstBuilder, AstEditor}; |
5 | use ra_db::SourceDatabase; | 9 | use ra_db::SourceDatabase; |
10 | use ra_prof::profile; | ||
6 | use ra_syntax::{ | 11 | use ra_syntax::{ |
7 | T, Location, TextRange, SyntaxNode, | 12 | ast::{self, AstNode, NamedField, NamedFieldList}, |
8 | ast::{self, AstNode, NamedFieldList, NamedField}, | 13 | Location, SyntaxNode, TextRange, T, |
9 | }; | 14 | }; |
10 | use ra_assists::ast_editor::{AstEditor, AstBuilder}; | ||
11 | use ra_text_edit::{TextEdit, TextEditBuilder}; | 15 | use ra_text_edit::{TextEdit, TextEditBuilder}; |
12 | use ra_prof::profile; | ||
13 | 16 | ||
14 | use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase}; | 17 | use crate::{db::RootDatabase, Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit}; |
15 | 18 | ||
16 | #[derive(Debug, Copy, Clone)] | 19 | #[derive(Debug, Copy, Clone)] |
17 | pub enum Severity { | 20 | pub enum Severity { |
@@ -170,9 +173,9 @@ fn check_struct_shorthand_initialization( | |||
170 | 173 | ||
171 | #[cfg(test)] | 174 | #[cfg(test)] |
172 | mod tests { | 175 | mod tests { |
173 | use test_utils::assert_eq_text; | ||
174 | use insta::assert_debug_snapshot_matches; | 176 | use insta::assert_debug_snapshot_matches; |
175 | use ra_syntax::SourceFile; | 177 | use ra_syntax::SourceFile; |
178 | use test_utils::assert_eq_text; | ||
176 | 179 | ||
177 | use crate::mock_analysis::single_file; | 180 | use crate::mock_analysis::single_file; |
178 | 181 | ||