From 1834bae5b86c54ed9dece26e82436919d59e6cb7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 4 Jul 2019 23:05:17 +0300 Subject: allow rustfmt to reorder imports This wasn't a right decision in the first place, the feature flag was broken in the last rustfmt release, and syntax highlighting of imports is more important anyway --- crates/ra_syntax/src/parsing/reparsing.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'crates/ra_syntax/src/parsing/reparsing.rs') diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs index cf27a3393..eeca94020 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs @@ -6,19 +6,20 @@ //! - otherwise, we search for the nearest `{}` block which contains the edit //! and try to parse only this block. -use ra_text_edit::AtomTextEdit; use ra_parser::Reparser; +use ra_text_edit::AtomTextEdit; use crate::{ - SyntaxKind::*, TextRange, TextUnit, SyntaxError, algo, - syntax_node::{GreenNode, SyntaxNode, GreenToken, SyntaxElement}, parsing::{ + lexer::{tokenize, Token}, text_token_source::TextTokenSource, text_tree_sink::TextTreeSink, - lexer::{tokenize, Token}, }, - T, + syntax_node::{GreenNode, GreenToken, SyntaxElement, SyntaxNode}, + SyntaxError, + SyntaxKind::*, + TextRange, TextUnit, T, }; pub(crate) fn incremental_reparse( @@ -168,10 +169,10 @@ fn merge_errors( mod tests { use std::sync::Arc; - use test_utils::{extract_range, assert_eq_text}; + use test_utils::{assert_eq_text, extract_range}; - use crate::{SourceFile, AstNode, Parse}; use super::*; + use crate::{AstNode, Parse, SourceFile}; fn do_check(before: &str, replace_with: &str, reparsed_len: u32) { let (range, before) = extract_range(before); -- cgit v1.2.3