aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast/edit.rs8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rast8
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0015_use_tree.rast6
4 files changed, 15 insertions, 11 deletions
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index 99f4726bc..2e958fa23 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -317,8 +317,12 @@ impl ast::UseTree {
317 Some(it) => it, 317 Some(it) => it,
318 None => return self.clone(), 318 None => return self.clone(),
319 }; 319 };
320 let use_tree = 320 let use_tree = make::use_tree(
321 make::use_tree(suffix, self.use_tree_list(), self.rename(), self.star_token().is_some()); 321 suffix,
322 self.use_tree_list(),
323 self.rename(),
324 self.star_token().is_some(),
325 );
322 let nested = make::use_tree_list(iter::once(use_tree)); 326 let nested = make::use_tree_list(iter::once(use_tree));
323 return make::use_tree(prefix.clone(), Some(nested), None, false); 327 return make::use_tree(prefix.clone(), Some(nested), None, false);
324 328
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rast b/crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rast
index f0e09d40d..8e9061e1d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rast
@@ -13,7 +13,7 @@ [email protected]
13 [email protected] 13 [email protected]
14 [email protected] "path" 14 [email protected] "path"
15 [email protected] " " 15 [email protected] " "
16 ALIAS@15..27 16 RENAME@15..27
17 [email protected] "as" 17 [email protected] "as"
18 [email protected] " " 18 [email protected] " "
19 [email protected] 19 [email protected]
@@ -43,7 +43,7 @@ [email protected]
43 [email protected] 43 [email protected]
44 [email protected] "path" 44 [email protected] "path"
45 [email protected] " " 45 [email protected] " "
46 ALIAS@54..72 46 RENAME@54..72
47 [email protected] "as" 47 [email protected] "as"
48 [email protected] " " 48 [email protected] " "
49 [email protected] 49 [email protected]
@@ -61,7 +61,7 @@ [email protected]
61 [email protected] 61 [email protected]
62 [email protected] "path" 62 [email protected] "path"
63 [email protected] " " 63 [email protected] " "
64 ALIAS@91..108 64 RENAME@91..108
65 [email protected] "as" 65 [email protected] "as"
66 [email protected] " " 66 [email protected] " "
67 [email protected] 67 [email protected]
@@ -130,7 +130,7 @@ [email protected]
130 [email protected] 130 [email protected]
131 [email protected] "Trait" 131 [email protected] "Trait"
132 [email protected] " " 132 [email protected] " "
133 ALIAS@192..196 133 RENAME@192..196
134 [email protected] "as" 134 [email protected] "as"
135 [email protected] " " 135 [email protected] " "
136 [email protected] "_" 136 [email protected] "_"
diff --git a/crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rast b/crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rast
index 271486605..948c4ddb3 100644
--- a/crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rast
@@ -16,7 +16,7 @@ [email protected]
16 [email protected] 16 [email protected]
17 [email protected] "foo" 17 [email protected] "foo"
18 [email protected] " " 18 [email protected] " "
19 ALIAS@35..41 19 RENAME@35..41
20 [email protected] "as" 20 [email protected] "as"
21 [email protected] " " 21 [email protected] " "
22 [email protected] 22 [email protected]
@@ -30,7 +30,7 @@ [email protected]
30 [email protected] " " 30 [email protected] " "
31 [email protected] "self" 31 [email protected] "self"
32 [email protected] " " 32 [email protected] " "
33 ALIAS@61..67 33 RENAME@61..67
34 [email protected] "as" 34 [email protected] "as"
35 [email protected] " " 35 [email protected] " "
36 [email protected] 36 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0015_use_tree.rast b/crates/ra_syntax/test_data/parser/ok/0015_use_tree.rast
index 09e0050f0..cdddb4214 100644
--- a/crates/ra_syntax/test_data/parser/ok/0015_use_tree.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0015_use_tree.rast
@@ -8,7 +8,7 @@ [email protected]
8 [email protected] 8 [email protected]
9 [email protected] "foo" 9 [email protected] "foo"
10 [email protected] " " 10 [email protected] " "
11 ALIAS@8..14 11 RENAME@8..14
12 [email protected] "as" 12 [email protected] "as"
13 [email protected] " " 13 [email protected] " "
14 [email protected] 14 [email protected]
@@ -32,7 +32,7 @@ [email protected]
32 [email protected] 32 [email protected]
33 [email protected] "a" 33 [email protected] "a"
34 [email protected] " " 34 [email protected] " "
35 ALIAS@28..32 35 RENAME@28..32
36 [email protected] "as" 36 [email protected] "as"
37 [email protected] " " 37 [email protected] " "
38 [email protected] 38 [email protected]
@@ -55,7 +55,7 @@ [email protected]
55 [email protected] 55 [email protected]
56 [email protected] "foo" 56 [email protected] "foo"
57 [email protected] " " 57 [email protected] " "
58 ALIAS@48..52 58 RENAME@48..52
59 [email protected] "as" 59 [email protected] "as"
60 [email protected] " " 60 [email protected] " "
61 [email protected] 61 [email protected]