aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAyomide Bamidele <[email protected]>2021-03-29 11:49:14 +0100
committerAyomide Bamidele <[email protected]>2021-03-29 11:49:14 +0100
commit23601454fe3467eccdcc6393145bfd0858bd84cb (patch)
treecd04818c06ca666a228fdc6873e7751f93dcbd0a /crates
parentf6702dda9a9527437475e130a01340566ccaf28a (diff)
New FoldKinds - Consts, Statics
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/folding_ranges.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ide/src/folding_ranges.rs b/crates/ide/src/folding_ranges.rs
index 379ee5650..1dd37483f 100644
--- a/crates/ide/src/folding_ranges.rs
+++ b/crates/ide/src/folding_ranges.rs
@@ -17,6 +17,8 @@ pub enum FoldKind {
17 Block, 17 Block,
18 ArgList, 18 ArgList,
19 Region, 19 Region,
20 Consts,
21 Statics,
20} 22}
21 23
22#[derive(Debug)] 24#[derive(Debug)]
@@ -250,6 +252,8 @@ mod tests {
250 FoldKind::Block => "block", 252 FoldKind::Block => "block",
251 FoldKind::ArgList => "arglist", 253 FoldKind::ArgList => "arglist",
252 FoldKind::Region => "region", 254 FoldKind::Region => "region",
255 FoldKind::Consts => "consts",
256 FoldKind::Statics => "statics"
253 }; 257 };
254 assert_eq!(kind, &attr.unwrap()); 258 assert_eq!(kind, &attr.unwrap());
255 } 259 }
@@ -472,7 +476,7 @@ const SECOND_CONST: &str = "second";</fold>
472 fn fold_consecutive_static() { 476 fn fold_consecutive_static() {
473 check( 477 check(
474 r#" 478 r#"
475<fold consts>static FIRST_STATIC: &str = "first"; 479<fold statics>static FIRST_STATIC: &str = "first";
476static SECOND_STATIC: &str = "second";</fold> 480static SECOND_STATIC: &str = "second";</fold>
477 "#, 481 "#,
478 ) 482 )