aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-07-04 21:05:17 +0100
committerAleksey Kladov <[email protected]>2019-07-04 21:09:09 +0100
commit1834bae5b86c54ed9dece26e82436919d59e6cb7 (patch)
tree92c8b984e874b67fa1831613464bbe356c1af3dd /crates/ra_syntax/src
parent2b2cd829b0f95aef338227deb05ec7503dae9b6c (diff)
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
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/algo.rs2
-rw-r--r--crates/ra_syntax/src/ast.rs8
-rw-r--r--crates/ra_syntax/src/ast/expr_extensions.rs6
-rw-r--r--crates/ra_syntax/src/ast/extensions.rs6
-rw-r--r--crates/ra_syntax/src/ast/tokens.rs6
-rw-r--r--crates/ra_syntax/src/ast/traits.rs4
-rw-r--r--crates/ra_syntax/src/fuzz.rs2
-rw-r--r--crates/ra_syntax/src/lib.rs19
-rw-r--r--crates/ra_syntax/src/parsing.rs7
-rw-r--r--crates/ra_syntax/src/parsing/lexer.rs3
-rw-r--r--crates/ra_syntax/src/parsing/lexer/numbers.rs5
-rw-r--r--crates/ra_syntax/src/parsing/reparsing.rs15
-rw-r--r--crates/ra_syntax/src/parsing/text_token_source.rs7
-rw-r--r--crates/ra_syntax/src/parsing/text_tree_sink.rs7
-rw-r--r--crates/ra_syntax/src/ptr.rs9
-rw-r--r--crates/ra_syntax/src/syntax_error.rs5
-rw-r--r--crates/ra_syntax/src/syntax_node.rs8
-rw-r--r--crates/ra_syntax/src/syntax_text.rs7
-rw-r--r--crates/ra_syntax/src/validation.rs7
-rw-r--r--crates/ra_syntax/src/validation/block.rs5
-rw-r--r--crates/ra_syntax/src/validation/field_expr.rs7
-rw-r--r--crates/ra_syntax/src/validation/unescape.rs2
22 files changed, 69 insertions, 78 deletions
diff --git a/crates/ra_syntax/src/algo.rs b/crates/ra_syntax/src/algo.rs
index d31d00343..fad8da132 100644
--- a/crates/ra_syntax/src/algo.rs
+++ b/crates/ra_syntax/src/algo.rs
@@ -2,7 +2,7 @@ pub mod visit;
2 2
3use itertools::Itertools; 3use itertools::Itertools;
4 4
5use crate::{SyntaxNode, TextRange, TextUnit, AstNode, Direction, SyntaxToken, SyntaxElement}; 5use crate::{AstNode, Direction, SyntaxElement, SyntaxNode, SyntaxToken, TextRange, TextUnit};
6 6
7pub use rowan::TokenAtOffset; 7pub use rowan::TokenAtOffset;
8 8
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 319110b6a..3dcf39f7e 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -9,16 +9,16 @@ mod expr_extensions;
9use std::marker::PhantomData; 9use std::marker::PhantomData;
10 10
11use crate::{ 11use crate::{
12 syntax_node::{SyntaxNode, SyntaxNodeChildren, TreeArc, SyntaxToken}, 12 syntax_node::{SyntaxNode, SyntaxNodeChildren, SyntaxToken, TreeArc},
13 SmolStr, 13 SmolStr,
14}; 14};
15 15
16pub use self::{ 16pub use self::{
17 expr_extensions::{ArrayExprKind, BinOp, ElseBranch, LiteralKind, PrefixOp},
18 extensions::{FieldKind, PathSegmentKind, SelfParamKind, StructKind},
17 generated::*, 19 generated::*,
18 traits::*,
19 tokens::*, 20 tokens::*,
20 extensions::{PathSegmentKind, StructKind,FieldKind, SelfParamKind}, 21 traits::*,
21 expr_extensions::{ElseBranch, PrefixOp, BinOp, LiteralKind,ArrayExprKind},
22}; 22};
23 23
24/// The main trait to go from untyped `SyntaxNode` to a typed ast. The 24/// The main trait to go from untyped `SyntaxNode` to a typed ast. The
diff --git a/crates/ra_syntax/src/ast/expr_extensions.rs b/crates/ra_syntax/src/ast/expr_extensions.rs
index d88671d45..87dbb0ea5 100644
--- a/crates/ra_syntax/src/ast/expr_extensions.rs
+++ b/crates/ra_syntax/src/ast/expr_extensions.rs
@@ -1,10 +1,10 @@
1//! Various extension methods to ast Expr Nodes, which are hard to code-generate. 1//! Various extension methods to ast Expr Nodes, which are hard to code-generate.
2 2
3use crate::{ 3use crate::{
4 SyntaxToken, SyntaxElement, SmolStr, 4 ast::{self, child_opt, children, AstChildren, AstNode},
5 ast::{self, AstNode, AstChildren, children, child_opt}, 5 SmolStr, SyntaxElement,
6 SyntaxKind::*, 6 SyntaxKind::*,
7 T 7 SyntaxToken, T,
8}; 8};
9 9
10#[derive(Debug, Clone, PartialEq, Eq)] 10#[derive(Debug, Clone, PartialEq, Eq)]
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs
index 930b2d9fa..72a30232d 100644
--- a/crates/ra_syntax/src/ast/extensions.rs
+++ b/crates/ra_syntax/src/ast/extensions.rs
@@ -4,10 +4,10 @@
4use itertools::Itertools; 4use itertools::Itertools;
5 5
6use crate::{ 6use crate::{
7 SmolStr, SyntaxToken, 7 ast::{self, child_opt, children, AstNode},
8 ast::{self, AstNode, children, child_opt}, 8 SmolStr, SyntaxElement,
9 SyntaxKind::*, 9 SyntaxKind::*,
10 SyntaxElement, T, 10 SyntaxToken, T,
11}; 11};
12use ra_parser::SyntaxKind; 12use ra_parser::SyntaxKind;
13 13
diff --git a/crates/ra_syntax/src/ast/tokens.rs b/crates/ra_syntax/src/ast/tokens.rs
index 08882ea69..be63b3c9e 100644
--- a/crates/ra_syntax/src/ast/tokens.rs
+++ b/crates/ra_syntax/src/ast/tokens.rs
@@ -1,9 +1,9 @@
1//! There are many AstNodes, but only a few tokens, so we hand-write them here. 1//! There are many AstNodes, but only a few tokens, so we hand-write them here.
2 2
3use crate::{ 3use crate::{
4 SyntaxToken,
5 SyntaxKind::{COMMENT, WHITESPACE},
6 ast::AstToken, 4 ast::AstToken,
5 SyntaxKind::{COMMENT, WHITESPACE},
6 SyntaxToken,
7}; 7};
8 8
9#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 9#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@@ -61,7 +61,7 @@ pub enum CommentPlacement {
61} 61}
62 62
63const COMMENT_PREFIX_TO_KIND: &[(&str, CommentKind)] = { 63const COMMENT_PREFIX_TO_KIND: &[(&str, CommentKind)] = {
64 use {CommentShape::*, CommentPlacement::*}; 64 use {CommentPlacement::*, CommentShape::*};
65 &[ 65 &[
66 ("///", CommentKind { shape: Line, doc: Some(Outer) }), 66 ("///", CommentKind { shape: Line, doc: Some(Outer) }),
67 ("//!", CommentKind { shape: Line, doc: Some(Inner) }), 67 ("//!", CommentKind { shape: Line, doc: Some(Inner) }),
diff --git a/crates/ra_syntax/src/ast/traits.rs b/crates/ra_syntax/src/ast/traits.rs
index 433485400..29cb53e35 100644
--- a/crates/ra_syntax/src/ast/traits.rs
+++ b/crates/ra_syntax/src/ast/traits.rs
@@ -5,8 +5,8 @@
5use itertools::Itertools; 5use itertools::Itertools;
6 6
7use crate::{ 7use crate::{
8 syntax_node::{SyntaxNodeChildren, SyntaxElementChildren}, 8 ast::{self, child_opt, children, AstChildren, AstNode, AstToken},
9 ast::{self, child_opt, children, AstNode, AstToken, AstChildren}, 9 syntax_node::{SyntaxElementChildren, SyntaxNodeChildren},
10}; 10};
11 11
12pub trait TypeAscriptionOwner: AstNode { 12pub trait TypeAscriptionOwner: AstNode {
diff --git a/crates/ra_syntax/src/fuzz.rs b/crates/ra_syntax/src/fuzz.rs
index 6a9905bd1..6d114aad4 100644
--- a/crates/ra_syntax/src/fuzz.rs
+++ b/crates/ra_syntax/src/fuzz.rs
@@ -1,4 +1,4 @@
1use crate::{SourceFile, validation, TextUnit, TextRange, AstNode}; 1use crate::{validation, AstNode, SourceFile, TextRange, TextUnit};
2use ra_text_edit::AtomTextEdit; 2use ra_text_edit::AtomTextEdit;
3use std::str::{self, FromStr}; 3use std::str::{self, FromStr};
4 4
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs
index e46ad12db..9790a984d 100644
--- a/crates/ra_syntax/src/lib.rs
+++ b/crates/ra_syntax/src/lib.rs
@@ -31,23 +31,26 @@ pub mod ast;
31#[doc(hidden)] 31#[doc(hidden)]
32pub mod fuzz; 32pub mod fuzz;
33 33
34use std::{sync::Arc, fmt::Write}; 34use std::{fmt::Write, sync::Arc};
35 35
36use ra_text_edit::AtomTextEdit; 36use ra_text_edit::AtomTextEdit;
37 37
38use crate::syntax_node::GreenNode; 38use crate::syntax_node::GreenNode;
39 39
40pub use rowan::{SmolStr, TextRange, TextUnit};
41pub use ra_parser::SyntaxKind;
42pub use ra_parser::T;
43pub use crate::{ 40pub use crate::{
44 ast::AstNode, 41 ast::AstNode,
45 syntax_error::{SyntaxError, SyntaxErrorKind, Location}, 42 parsing::{classify_literal, tokenize, Token},
43 ptr::{AstPtr, SyntaxNodePtr},
44 syntax_error::{Location, SyntaxError, SyntaxErrorKind},
45 syntax_node::{
46 Direction, InsertPosition, SyntaxElement, SyntaxNode, SyntaxToken, SyntaxTreeBuilder,
47 TreeArc, WalkEvent,
48 },
46 syntax_text::SyntaxText, 49 syntax_text::SyntaxText,
47 syntax_node::{Direction, SyntaxNode, WalkEvent, TreeArc, SyntaxTreeBuilder, SyntaxElement, SyntaxToken, InsertPosition},
48 ptr::{SyntaxNodePtr, AstPtr},
49 parsing::{tokenize, classify_literal, Token},
50}; 50};
51pub use ra_parser::SyntaxKind;
52pub use ra_parser::T;
53pub use rowan::{SmolStr, TextRange, TextUnit};
51 54
52/// `Parse` is the result of the parsing: a syntax tree and a collection of 55/// `Parse` is the result of the parsing: a syntax tree and a collection of
53/// errors. 56/// errors.
diff --git a/crates/ra_syntax/src/parsing.rs b/crates/ra_syntax/src/parsing.rs
index 4c1fa6c4f..0387f0378 100644
--- a/crates/ra_syntax/src/parsing.rs
+++ b/crates/ra_syntax/src/parsing.rs
@@ -6,12 +6,9 @@ mod text_token_source;
6mod text_tree_sink; 6mod text_tree_sink;
7mod reparsing; 7mod reparsing;
8 8
9use crate::{ 9use crate::{syntax_node::GreenNode, SyntaxError};
10 SyntaxError,
11 syntax_node::GreenNode,
12};
13 10
14pub use self::lexer::{tokenize, classify_literal, Token}; 11pub use self::lexer::{classify_literal, tokenize, Token};
15 12
16pub(crate) use self::reparsing::incremental_reparse; 13pub(crate) use self::reparsing::incremental_reparse;
17 14
diff --git a/crates/ra_syntax/src/parsing/lexer.rs b/crates/ra_syntax/src/parsing/lexer.rs
index 6eb96f03d..60cf37047 100644
--- a/crates/ra_syntax/src/parsing/lexer.rs
+++ b/crates/ra_syntax/src/parsing/lexer.rs
@@ -6,8 +6,7 @@ mod strings;
6 6
7use crate::{ 7use crate::{
8 SyntaxKind::{self, *}, 8 SyntaxKind::{self, *},
9 TextUnit, 9 TextUnit, T,
10 T,
11}; 10};
12 11
13use self::{ 12use self::{
diff --git a/crates/ra_syntax/src/parsing/lexer/numbers.rs b/crates/ra_syntax/src/parsing/lexer/numbers.rs
index 874fb8b32..e53ae231b 100644
--- a/crates/ra_syntax/src/parsing/lexer/numbers.rs
+++ b/crates/ra_syntax/src/parsing/lexer/numbers.rs
@@ -1,7 +1,4 @@
1use crate::parsing::lexer::{ 1use crate::parsing::lexer::{classes::*, ptr::Ptr};
2 ptr::Ptr,
3 classes::*,
4};
5 2
6use crate::SyntaxKind::{self, *}; 3use crate::SyntaxKind::{self, *};
7 4
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 @@
6//! - otherwise, we search for the nearest `{}` block which contains the edit 6//! - otherwise, we search for the nearest `{}` block which contains the edit
7//! and try to parse only this block. 7//! and try to parse only this block.
8 8
9use ra_text_edit::AtomTextEdit;
10use ra_parser::Reparser; 9use ra_parser::Reparser;
10use ra_text_edit::AtomTextEdit;
11 11
12use crate::{ 12use crate::{
13 SyntaxKind::*, TextRange, TextUnit, SyntaxError,
14 algo, 13 algo,
15 syntax_node::{GreenNode, SyntaxNode, GreenToken, SyntaxElement},
16 parsing::{ 14 parsing::{
15 lexer::{tokenize, Token},
17 text_token_source::TextTokenSource, 16 text_token_source::TextTokenSource,
18 text_tree_sink::TextTreeSink, 17 text_tree_sink::TextTreeSink,
19 lexer::{tokenize, Token},
20 }, 18 },
21 T, 19 syntax_node::{GreenNode, GreenToken, SyntaxElement, SyntaxNode},
20 SyntaxError,
21 SyntaxKind::*,
22 TextRange, TextUnit, T,
22}; 23};
23 24
24pub(crate) fn incremental_reparse( 25pub(crate) fn incremental_reparse(
@@ -168,10 +169,10 @@ fn merge_errors(
168mod tests { 169mod tests {
169 use std::sync::Arc; 170 use std::sync::Arc;
170 171
171 use test_utils::{extract_range, assert_eq_text}; 172 use test_utils::{assert_eq_text, extract_range};
172 173
173 use crate::{SourceFile, AstNode, Parse};
174 use super::*; 174 use super::*;
175 use crate::{AstNode, Parse, SourceFile};
175 176
176 fn do_check(before: &str, replace_with: &str, reparsed_len: u32) { 177 fn do_check(before: &str, replace_with: &str, reparsed_len: u32) {
177 let (range, before) = extract_range(before); 178 let (range, before) = extract_range(before);
diff --git a/crates/ra_syntax/src/parsing/text_token_source.rs b/crates/ra_syntax/src/parsing/text_token_source.rs
index 71d2947f7..f592b499f 100644
--- a/crates/ra_syntax/src/parsing/text_token_source.rs
+++ b/crates/ra_syntax/src/parsing/text_token_source.rs
@@ -1,10 +1,7 @@
1use ra_parser::TokenSource;
2use ra_parser::Token as PToken; 1use ra_parser::Token as PToken;
2use ra_parser::TokenSource;
3 3
4use crate::{ 4use crate::{parsing::lexer::Token, SyntaxKind::EOF, TextRange, TextUnit};
5 SyntaxKind::EOF, TextRange, TextUnit,
6 parsing::lexer::Token,
7};
8 5
9pub(crate) struct TextTokenSource<'t> { 6pub(crate) struct TextTokenSource<'t> {
10 text: &'t str, 7 text: &'t str,
diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs
index 71fc515f2..bf1b35c95 100644
--- a/crates/ra_syntax/src/parsing/text_tree_sink.rs
+++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs
@@ -1,12 +1,13 @@
1use std::mem; 1use std::mem;
2 2
3use ra_parser::{TreeSink, ParseError}; 3use ra_parser::{ParseError, TreeSink};
4 4
5use crate::{ 5use crate::{
6 SmolStr, SyntaxError, TextUnit, TextRange, SyntaxTreeBuilder,
7 SyntaxKind::{self, *},
8 parsing::Token, 6 parsing::Token,
9 syntax_node::GreenNode, 7 syntax_node::GreenNode,
8 SmolStr, SyntaxError,
9 SyntaxKind::{self, *},
10 SyntaxTreeBuilder, TextRange, TextUnit,
10}; 11};
11 12
12/// Bridges the parser with our specific syntax tree representation. 13/// Bridges the parser with our specific syntax tree representation.
diff --git a/crates/ra_syntax/src/ptr.rs b/crates/ra_syntax/src/ptr.rs
index 10cddb852..0550dca1a 100644
--- a/crates/ra_syntax/src/ptr.rs
+++ b/crates/ra_syntax/src/ptr.rs
@@ -1,10 +1,5 @@
1use std::{ 1use crate::{AstNode, SyntaxKind, SyntaxNode, TextRange};
2 marker::PhantomData, 2use std::{iter::successors, marker::PhantomData};
3 iter::successors,
4};
5use crate::{
6 AstNode, SyntaxKind, SyntaxNode, TextRange,
7};
8 3
9/// A pointer to a syntax node inside a file. It can be used to remember a 4/// A pointer to a syntax node inside a file. It can be used to remember a
10/// specific node across reparses of the same file. 5/// specific node across reparses of the same file.
diff --git a/crates/ra_syntax/src/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs
index d29c0cf6c..5aefec768 100644
--- a/crates/ra_syntax/src/syntax_error.rs
+++ b/crates/ra_syntax/src/syntax_error.rs
@@ -2,10 +2,7 @@ use std::fmt;
2 2
3use ra_parser::ParseError; 3use ra_parser::ParseError;
4 4
5use crate::{ 5use crate::{validation::EscapeError, TextRange, TextUnit};
6 TextRange, TextUnit,
7 validation::EscapeError,
8};
9 6
10#[derive(Debug, Clone, PartialEq, Eq, Hash)] 7#[derive(Debug, Clone, PartialEq, Eq, Hash)]
11pub struct SyntaxError { 8pub struct SyntaxError {
diff --git a/crates/ra_syntax/src/syntax_node.rs b/crates/ra_syntax/src/syntax_node.rs
index 4105b5220..80c8639c8 100644
--- a/crates/ra_syntax/src/syntax_node.rs
+++ b/crates/ra_syntax/src/syntax_node.rs
@@ -7,18 +7,18 @@
7//! modules just wraps its API. 7//! modules just wraps its API.
8 8
9use std::{ 9use std::{
10 ops::RangeInclusive,
11 fmt::{self, Write},
12 borrow::Borrow, 10 borrow::Borrow,
11 fmt::{self, Write},
13 iter::successors, 12 iter::successors,
13 ops::RangeInclusive,
14}; 14};
15 15
16use ra_parser::ParseError; 16use ra_parser::ParseError;
17use rowan::{TransparentNewType, GreenNodeBuilder}; 17use rowan::{GreenNodeBuilder, TransparentNewType};
18 18
19use crate::{ 19use crate::{
20 SmolStr, SyntaxKind, TextUnit, TextRange, SyntaxText, SourceFile, AstNode, SyntaxNodePtr,
21 syntax_error::{SyntaxError, SyntaxErrorKind}, 20 syntax_error::{SyntaxError, SyntaxErrorKind},
21 AstNode, SmolStr, SourceFile, SyntaxKind, SyntaxNodePtr, SyntaxText, TextRange, TextUnit,
22}; 22};
23 23
24pub use rowan::WalkEvent; 24pub use rowan::WalkEvent;
diff --git a/crates/ra_syntax/src/syntax_text.rs b/crates/ra_syntax/src/syntax_text.rs
index c9038cd5c..e648dc082 100644
--- a/crates/ra_syntax/src/syntax_text.rs
+++ b/crates/ra_syntax/src/syntax_text.rs
@@ -1,6 +1,9 @@
1use std::{fmt, ops::{self, Bound}}; 1use std::{
2 fmt,
3 ops::{self, Bound},
4};
2 5
3use crate::{SmolStr, SyntaxNode, TextRange, TextUnit, SyntaxElement}; 6use crate::{SmolStr, SyntaxElement, SyntaxNode, TextRange, TextUnit};
4 7
5#[derive(Clone)] 8#[derive(Clone)]
6pub struct SyntaxText<'a> { 9pub struct SyntaxText<'a> {
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs
index b53900a4b..87522ec18 100644
--- a/crates/ra_syntax/src/validation.rs
+++ b/crates/ra_syntax/src/validation.rs
@@ -4,11 +4,10 @@ mod block;
4mod field_expr; 4mod field_expr;
5 5
6use crate::{ 6use crate::{
7 SourceFile, SyntaxError, AstNode, SyntaxNode, TextUnit,
8 SyntaxKind::{BYTE, BYTE_STRING, STRING, CHAR},
9 ast,
10 algo::visit::{visitor_ctx, VisitorCtx}, 7 algo::visit::{visitor_ctx, VisitorCtx},
11 T, 8 ast, AstNode, SourceFile, SyntaxError,
9 SyntaxKind::{BYTE, BYTE_STRING, CHAR, STRING},
10 SyntaxNode, TextUnit, T,
12}; 11};
13 12
14pub(crate) use unescape::EscapeError; 13pub(crate) use unescape::EscapeError;
diff --git a/crates/ra_syntax/src/validation/block.rs b/crates/ra_syntax/src/validation/block.rs
index f2cf3cbbd..46650d9b0 100644
--- a/crates/ra_syntax/src/validation/block.rs
+++ b/crates/ra_syntax/src/validation/block.rs
@@ -1,7 +1,8 @@
1use crate::{SyntaxKind::*, 1use crate::{
2 ast::{self, AttrsOwner, AstNode}, 2 ast::{self, AstNode, AttrsOwner},
3 SyntaxError, 3 SyntaxError,
4 SyntaxErrorKind::*, 4 SyntaxErrorKind::*,
5 SyntaxKind::*,
5}; 6};
6 7
7pub(crate) fn validate_block_node(node: &ast::Block, errors: &mut Vec<SyntaxError>) { 8pub(crate) fn validate_block_node(node: &ast::Block, errors: &mut Vec<SyntaxError>) {
diff --git a/crates/ra_syntax/src/validation/field_expr.rs b/crates/ra_syntax/src/validation/field_expr.rs
index 2b405062e..d3020edf7 100644
--- a/crates/ra_syntax/src/validation/field_expr.rs
+++ b/crates/ra_syntax/src/validation/field_expr.rs
@@ -1,6 +1,7 @@
1use crate::{ast::{self, FieldKind}, 1use crate::{
2 SyntaxError, 2 ast::{self, FieldKind},
3 SyntaxErrorKind::*, 3 SyntaxError,
4 SyntaxErrorKind::*,
4}; 5};
5 6
6pub(crate) fn validate_field_expr_node(node: &ast::FieldExpr, errors: &mut Vec<SyntaxError>) { 7pub(crate) fn validate_field_expr_node(node: &ast::FieldExpr, errors: &mut Vec<SyntaxError>) {
diff --git a/crates/ra_syntax/src/validation/unescape.rs b/crates/ra_syntax/src/validation/unescape.rs
index 91dbcfae8..4c3a7effc 100644
--- a/crates/ra_syntax/src/validation/unescape.rs
+++ b/crates/ra_syntax/src/validation/unescape.rs
@@ -7,8 +7,8 @@
7//! 7//!
8//! Hopefully, we'll share this code in a proper way some day 8//! Hopefully, we'll share this code in a proper way some day
9 9
10use std::str::Chars;
11use std::ops::Range; 10use std::ops::Range;
11use std::str::Chars;
12 12
13#[derive(Debug, PartialEq, Eq, Clone, Hash)] 13#[derive(Debug, PartialEq, Eq, Clone, Hash)]
14pub enum EscapeError { 14pub enum EscapeError {