]> git.lizzy.rs Git - rust.git/commitdiff
New FoldKinds - Consts, Statics
authorAyomide Bamidele <ayoeze@hotmail.com>
Mon, 29 Mar 2021 10:49:14 +0000 (11:49 +0100)
committerAyomide Bamidele <ayoeze@hotmail.com>
Mon, 29 Mar 2021 10:49:14 +0000 (11:49 +0100)
crates/ide/src/folding_ranges.rs

index 379ee56502ec43759d064240408c7a2435d9c357..1dd37483f6cb63d87c081ccaa99f5d9bf53dada4 100644 (file)
@@ -17,6 +17,8 @@ pub enum FoldKind {
     Block,
     ArgList,
     Region,
+    Consts,
+    Statics,
 }
 
 #[derive(Debug)]
@@ -250,6 +252,8 @@ fn check(ra_fixture: &str) {
                 FoldKind::Block => "block",
                 FoldKind::ArgList => "arglist",
                 FoldKind::Region => "region",
+                FoldKind::Consts => "consts",
+                FoldKind::Statics => "statics"
             };
             assert_eq!(kind, &attr.unwrap());
         }
@@ -472,7 +476,7 @@ fn fold_consecutive_const() {
     fn fold_consecutive_static() {
         check(
             r#"
-<fold consts>static FIRST_STATIC: &str = "first";
+<fold statics>static FIRST_STATIC: &str = "first";
 static SECOND_STATIC: &str = "second";</fold>
             "#,
         )