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
This commit is contained in:
Aleksey Kladov 2019-07-04 23:05:17 +03:00
parent 2b2cd829b0
commit 1834bae5b8
166 changed files with 798 additions and 814 deletions

View file

@ -6,8 +6,7 @@ mod strings;
use crate::{
SyntaxKind::{self, *},
TextUnit,
T,
TextUnit, T,
};
use self::{

View file

@ -1,7 +1,4 @@
use crate::parsing::lexer::{
ptr::Ptr,
classes::*,
};
use crate::parsing::lexer::{classes::*, ptr::Ptr};
use crate::SyntaxKind::{self, *};

View file

@ -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);

View file

@ -1,10 +1,7 @@
use ra_parser::TokenSource;
use ra_parser::Token as PToken;
use ra_parser::TokenSource;
use crate::{
SyntaxKind::EOF, TextRange, TextUnit,
parsing::lexer::Token,
};
use crate::{parsing::lexer::Token, SyntaxKind::EOF, TextRange, TextUnit};
pub(crate) struct TextTokenSource<'t> {
text: &'t str,

View file

@ -1,12 +1,13 @@
use std::mem;
use ra_parser::{TreeSink, ParseError};
use ra_parser::{ParseError, TreeSink};
use crate::{
SmolStr, SyntaxError, TextUnit, TextRange, SyntaxTreeBuilder,
SyntaxKind::{self, *},
parsing::Token,
syntax_node::GreenNode,
SmolStr, SyntaxError,
SyntaxKind::{self, *},
SyntaxTreeBuilder, TextRange, TextUnit,
};
/// Bridges the parser with our specific syntax tree representation.