From a1c8bdecfd408b7573357604f9c6543556f3f19a Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 4 Dec 2020 15:51:23 +0100 Subject: Use items can also have doc comments --- crates/ide/src/folding_ranges.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'crates/ide/src') 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 { fn fold_kind(kind: SyntaxKind) -> Option { match kind { COMMENT => Some(FoldKind::Comment), - USE => Some(FoldKind::Imports), ARG_LIST | PARAM_LIST => Some(FoldKind::ArgList), ASSOC_ITEM_LIST | RECORD_FIELD_LIST @@ -258,11 +257,11 @@ fn main() { fn test_fold_imports() { check( r#" -use std::{ +use std::{ str, vec, io as iop -}; +}; fn main() { }"#, @@ -306,9 +305,9 @@ use std::io as iop; use std::mem; use std::f64; -use std::collections::HashMap; +use std::collections::HashMap; // Some random comment -use std::collections::VecDeque; +use std::collections::VecDeque; fn main() { }"#, @@ -326,10 +325,10 @@ use std::io as iop; use std::mem; use std::f64; -use std::collections::{ +use std::collections::{ HashMap, VecDeque, -}; +}; // Some random comment fn main() { -- cgit v1.2.3