aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock48
-rw-r--r--crates/ide/src/folding_ranges.rs13
-rw-r--r--crates/syntax/src/ast/node_ext.rs1
-rw-r--r--crates/syntax/src/parsing/text_tree_sink.rs2
-rw-r--r--crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast18
-rw-r--r--crates/syntax/test_data/parser/inline/ok/0110_use_path.rast12
-rw-r--r--xtask/tests/tidy.rs1
7 files changed, 42 insertions, 53 deletions
diff --git a/Cargo.lock b/Cargo.lock
index b73fb909c..1101770e7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -26,9 +26,9 @@ dependencies = [
26 26
27[[package]] 27[[package]]
28name = "anyhow" 28name = "anyhow"
29version = "1.0.34" 29version = "1.0.35"
30source = "registry+https://github.com/rust-lang/crates.io-index" 30source = "registry+https://github.com/rust-lang/crates.io-index"
31checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7" 31checksum = "2c0df63cb2955042487fad3aefd2c6e3ae7389ac5dc1beb28921de0b69f779d4"
32 32
33[[package]] 33[[package]]
34name = "anymap" 34name = "anymap"
@@ -139,9 +139,9 @@ dependencies = [
139 139
140[[package]] 140[[package]]
141name = "cc" 141name = "cc"
142version = "1.0.65" 142version = "1.0.66"
143source = "registry+https://github.com/rust-lang/crates.io-index" 143source = "registry+https://github.com/rust-lang/crates.io-index"
144checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15" 144checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
145 145
146[[package]] 146[[package]]
147name = "cfg" 147name = "cfg"
@@ -232,15 +232,6 @@ dependencies = [
232] 232]
233 233
234[[package]] 234[[package]]
235name = "cloudabi"
236version = "0.1.0"
237source = "registry+https://github.com/rust-lang/crates.io-index"
238checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467"
239dependencies = [
240 "bitflags",
241]
242
243[[package]]
244name = "cmake" 235name = "cmake"
245version = "0.1.45" 236version = "0.1.45"
246source = "registry+https://github.com/rust-lang/crates.io-index" 237source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -388,9 +379,9 @@ dependencies = [
388 379
389[[package]] 380[[package]]
390name = "expect-test" 381name = "expect-test"
391version = "1.0.1" 382version = "1.0.2"
392source = "registry+https://github.com/rust-lang/crates.io-index" 383source = "registry+https://github.com/rust-lang/crates.io-index"
393checksum = "ceb96f3eaa0d4e8769c52dacfd4eb60183b817ed2f176171b3c691d5022b0f2e" 384checksum = "eab78d4c727fa879de40951ffc01ed781a231b28786b19d6bfbdc0d1ec92eb3e"
394dependencies = [ 385dependencies = [
395 "difference", 386 "difference",
396 "once_cell", 387 "once_cell",
@@ -796,9 +787,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
796 787
797[[package]] 788[[package]]
798name = "libc" 789name = "libc"
799version = "0.2.80" 790version = "0.2.81"
800source = "registry+https://github.com/rust-lang/crates.io-index" 791source = "registry+https://github.com/rust-lang/crates.io-index"
801checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" 792checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb"
802 793
803[[package]] 794[[package]]
804name = "libloading" 795name = "libloading"
@@ -1088,12 +1079,11 @@ dependencies = [
1088 1079
1089[[package]] 1080[[package]]
1090name = "parking_lot_core" 1081name = "parking_lot_core"
1091version = "0.8.0" 1082version = "0.8.1"
1092source = "registry+https://github.com/rust-lang/crates.io-index" 1083source = "registry+https://github.com/rust-lang/crates.io-index"
1093checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" 1084checksum = "d7c6d9b8427445284a09c55be860a15855ab580a417ccad9da88f5a06787ced0"
1094dependencies = [ 1085dependencies = [
1095 "cfg-if 0.1.10", 1086 "cfg-if 1.0.0",
1096 "cloudabi",
1097 "instant", 1087 "instant",
1098 "libc", 1088 "libc",
1099 "redox_syscall", 1089 "redox_syscall",
@@ -1536,18 +1526,18 @@ dependencies = [
1536 1526
1537[[package]] 1527[[package]]
1538name = "serde" 1528name = "serde"
1539version = "1.0.117" 1529version = "1.0.118"
1540source = "registry+https://github.com/rust-lang/crates.io-index" 1530source = "registry+https://github.com/rust-lang/crates.io-index"
1541checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" 1531checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800"
1542dependencies = [ 1532dependencies = [
1543 "serde_derive", 1533 "serde_derive",
1544] 1534]
1545 1535
1546[[package]] 1536[[package]]
1547name = "serde_derive" 1537name = "serde_derive"
1548version = "1.0.117" 1538version = "1.0.118"
1549source = "registry+https://github.com/rust-lang/crates.io-index" 1539source = "registry+https://github.com/rust-lang/crates.io-index"
1550checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" 1540checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df"
1551dependencies = [ 1541dependencies = [
1552 "proc-macro2", 1542 "proc-macro2",
1553 "quote", 1543 "quote",
@@ -1594,9 +1584,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
1594 1584
1595[[package]] 1585[[package]]
1596name = "smallvec" 1586name = "smallvec"
1597version = "1.5.0" 1587version = "1.5.1"
1598source = "registry+https://github.com/rust-lang/crates.io-index" 1588source = "registry+https://github.com/rust-lang/crates.io-index"
1599checksum = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" 1589checksum = "ae524f056d7d770e174287294f562e95044c68e88dec909a00d2094805db9d75"
1600 1590
1601[[package]] 1591[[package]]
1602name = "smol_str" 1592name = "smol_str"
@@ -1627,9 +1617,9 @@ version = "0.0.0"
1627 1617
1628[[package]] 1618[[package]]
1629name = "syn" 1619name = "syn"
1630version = "1.0.53" 1620version = "1.0.54"
1631source = "registry+https://github.com/rust-lang/crates.io-index" 1621source = "registry+https://github.com/rust-lang/crates.io-index"
1632checksum = "8833e20724c24de12bbaba5ad230ea61c3eafb05b881c7c9d3cfe8638b187e68" 1622checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44"
1633dependencies = [ 1623dependencies = [
1634 "proc-macro2", 1624 "proc-macro2",
1635 "quote", 1625 "quote",
diff --git a/crates/ide/src/folding_ranges.rs b/crates/ide/src/folding_ranges.rs
index 7523aec55..45170dd29 100644
--- a/crates/ide/src/folding_ranges.rs
+++ b/crates/ide/src/folding_ranges.rs
@@ -83,7 +83,6 @@ pub(crate) fn folding_ranges(file: &SourceFile) -> Vec<Fold> {
83fn fold_kind(kind: SyntaxKind) -> Option<FoldKind> { 83fn fold_kind(kind: SyntaxKind) -> Option<FoldKind> {
84 match kind { 84 match kind {
85 COMMENT => Some(FoldKind::Comment), 85 COMMENT => Some(FoldKind::Comment),
86 USE => Some(FoldKind::Imports),
87 ARG_LIST | PARAM_LIST => Some(FoldKind::ArgList), 86 ARG_LIST | PARAM_LIST => Some(FoldKind::ArgList),
88 ASSOC_ITEM_LIST 87 ASSOC_ITEM_LIST
89 | RECORD_FIELD_LIST 88 | RECORD_FIELD_LIST
@@ -258,11 +257,11 @@ fn main() <fold block>{
258 fn test_fold_imports() { 257 fn test_fold_imports() {
259 check( 258 check(
260 r#" 259 r#"
261<fold imports>use std::<fold block>{ 260use std::<fold block>{
262 str, 261 str,
263 vec, 262 vec,
264 io as iop 263 io as iop
265}</fold>;</fold> 264}</fold>;
266 265
267fn main() <fold block>{ 266fn main() <fold block>{
268}</fold>"#, 267}</fold>"#,
@@ -306,9 +305,9 @@ use std::io as iop;</fold>
306<fold imports>use std::mem; 305<fold imports>use std::mem;
307use std::f64;</fold> 306use std::f64;</fold>
308 307
309use std::collections::HashMap; 308<fold imports>use std::collections::HashMap;
310// Some random comment 309// Some random comment
311use std::collections::VecDeque; 310use std::collections::VecDeque;</fold>
312 311
313fn main() <fold block>{ 312fn main() <fold block>{
314}</fold>"#, 313}</fold>"#,
@@ -326,10 +325,10 @@ use std::io as iop;</fold>
326<fold imports>use std::mem; 325<fold imports>use std::mem;
327use std::f64;</fold> 326use std::f64;</fold>
328 327
329<fold imports>use std::collections::<fold block>{ 328use std::collections::<fold block>{
330 HashMap, 329 HashMap,
331 VecDeque, 330 VecDeque,
332}</fold>;</fold> 331}</fold>;
333// Some random comment 332// Some random comment
334 333
335fn main() <fold block>{ 334fn main() <fold block>{
diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs
index b70b840b8..aa3a4b606 100644
--- a/crates/syntax/src/ast/node_ext.rs
+++ b/crates/syntax/src/ast/node_ext.rs
@@ -477,3 +477,4 @@ impl ast::DocCommentsOwner for ast::Const {}
477impl ast::DocCommentsOwner for ast::TypeAlias {} 477impl ast::DocCommentsOwner for ast::TypeAlias {}
478impl ast::DocCommentsOwner for ast::Impl {} 478impl ast::DocCommentsOwner for ast::Impl {}
479impl ast::DocCommentsOwner for ast::MacroCall {} 479impl ast::DocCommentsOwner for ast::MacroCall {}
480impl ast::DocCommentsOwner for ast::Use {}
diff --git a/crates/syntax/src/parsing/text_tree_sink.rs b/crates/syntax/src/parsing/text_tree_sink.rs
index 997bc5d28..49842177a 100644
--- a/crates/syntax/src/parsing/text_tree_sink.rs
+++ b/crates/syntax/src/parsing/text_tree_sink.rs
@@ -148,7 +148,7 @@ fn n_attached_trivias<'a>(
148) -> usize { 148) -> usize {
149 match kind { 149 match kind {
150 MACRO_CALL | CONST | TYPE_ALIAS | STRUCT | ENUM | VARIANT | FN | TRAIT | MODULE 150 MACRO_CALL | CONST | TYPE_ALIAS | STRUCT | ENUM | VARIANT | FN | TRAIT | MODULE
151 | RECORD_FIELD | STATIC => { 151 | RECORD_FIELD | STATIC | USE => {
152 let mut res = 0; 152 let mut res = 0;
153 let mut trivias = trivias.enumerate().peekable(); 153 let mut trivias = trivias.enumerate().peekable();
154 154
diff --git a/crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast b/crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast
index 1e80dd7e2..b1fb75ed1 100644
--- a/crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast
+++ b/crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast
@@ -49,9 +49,9 @@ [email protected]
49 [email protected] "}" 49 [email protected] "}"
50 [email protected] ";" 50 [email protected] ";"
51 [email protected] " " 51 [email protected] " "
52 COMMENT@59..97 "// Rust 2018 (with a ..." 52 USE@59..121
53 WHITESPACE@97..98 "\n" 53 COMMENT@59..97 "// Rust 2018 (with a ..."
54 USE@98..121 54 WHITESPACE@97..98 "\n"
55 [email protected] "use" 55 [email protected] "use"
56 [email protected] " " 56 [email protected] " "
57 [email protected] 57 [email protected]
@@ -75,9 +75,9 @@ [email protected]
75 [email protected] "}" 75 [email protected] "}"
76 [email protected] ";" 76 [email protected] ";"
77 [email protected] " " 77 [email protected] " "
78 COMMENT@122..134 "// Rust 2015" 78 US[email protected]66
79 WHITESPACE@134..135 "\n" 79 COMMENT@122..134 "// Rust 2015"
80 USE@135..166 80 WHITESPACE@134..135 "\n"
81 [email protected] "use" 81 [email protected] "use"
82 [email protected] " " 82 [email protected] " "
83 [email protected] 83 [email protected]
@@ -102,9 +102,9 @@ [email protected]
102 [email protected] "}" 102 [email protected] "}"
103 [email protected] ";" 103 [email protected] ";"
104 [email protected] " " 104 [email protected] " "
105 COMMENT@167..179 "// Rust 2015" 105 US[email protected]
106 WHITESPACE@179..180 "\n" 106 COMMENT@167..179 "// Rust 2015"
107 USE@180..205 107 WHITESPACE@179..180 "\n"
108 [email protected] "use" 108 [email protected] "use"
109 [email protected] " " 109 [email protected] " "
110 [email protected] 110 [email protected]
diff --git a/crates/syntax/test_data/parser/inline/ok/0110_use_path.rast b/crates/syntax/test_data/parser/inline/ok/0110_use_path.rast
index 82028096f..c9fad5f8c 100644
--- a/crates/syntax/test_data/parser/inline/ok/0110_use_path.rast
+++ b/crates/syntax/test_data/parser/inline/ok/0110_use_path.rast
@@ -10,9 +10,9 @@ [email protected]
10 [email protected] "crate_name" 10 [email protected] "crate_name"
11 [email protected] ";" 11 [email protected] ";"
12 [email protected] " " 12 [email protected] " "
13 COMMENT@18..45 "// Rust 2018 - All fl ..." 13 USE@18..61
14 WHITESPACE@45..46 "\n" 14 COMMENT@18..45 "// Rust 2018 - All fl ..."
15 USE@46..61 15 WHITESPACE@45..46 "\n"
16 [email protected] "use" 16 [email protected] "use"
17 [email protected] " " 17 [email protected] " "
18 [email protected] 18 [email protected]
@@ -22,9 +22,9 @@ [email protected]
22 [email protected] "crate_name" 22 [email protected] "crate_name"
23 [email protected] ";" 23 [email protected] ";"
24 [email protected] " " 24 [email protected] " "
25 COMMENT@62..91 "// Rust 2018 - Anchor ..." 25 US[email protected]4
26 WHITESPACE@91..92 "\n" 26 COMMENT@62..91 "// Rust 2018 - Anchor ..."
27 USE@92..124 27 WHITESPACE@91..92 "\n"
28 [email protected] "use" 28 [email protected] "use"
29 [email protected] " " 29 [email protected] " "
30 [email protected] 30 [email protected]
diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs
index 4c58aed59..6bfa922e6 100644
--- a/xtask/tests/tidy.rs
+++ b/xtask/tests/tidy.rs
@@ -161,7 +161,6 @@ Apache-2.0 OR BSL-1.0
161Apache-2.0 OR MIT 161Apache-2.0 OR MIT
162Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT 162Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
163Apache-2.0/MIT 163Apache-2.0/MIT
164BSD-2-Clause
165BSD-3-Clause 164BSD-3-Clause
166CC0-1.0 165CC0-1.0
167ISC 166ISC