aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-22 14:54:13 +0100
committerGitHub <[email protected]>2021-05-22 14:54:13 +0100
commitd56e52402eedbd738b5161cd1e5a8c152cb65e21 (patch)
treec88222888e201b2173cd4a15673bd879cb88dd95 /crates/ide
parent542337eca49986d785db2318bfe9c70809d4a229 (diff)
parent188b0f96f98feaa0771f941343887c46113c8ced (diff)
Merge #8922
8922: Add more docs r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/display/navigation_target.rs2
-rwxr-xr-xcrates/ide/src/folding_ranges.rs6
2 files changed, 5 insertions, 3 deletions
diff --git a/crates/ide/src/display/navigation_target.rs b/crates/ide/src/display/navigation_target.rs
index 2079c22a3..b75ec411c 100644
--- a/crates/ide/src/display/navigation_target.rs
+++ b/crates/ide/src/display/navigation_target.rs
@@ -1,4 +1,4 @@
1//! FIXME: write short doc here 1//! See [`NavigationTarget`].
2 2
3use std::fmt; 3use std::fmt;
4 4
diff --git a/crates/ide/src/folding_ranges.rs b/crates/ide/src/folding_ranges.rs
index a03988778..b893c1c54 100755
--- a/crates/ide/src/folding_ranges.rs
+++ b/crates/ide/src/folding_ranges.rs
@@ -1,5 +1,3 @@
1//! FIXME: write short doc here
2
3use rustc_hash::FxHashSet; 1use rustc_hash::FxHashSet;
4 2
5use syntax::{ 3use syntax::{
@@ -29,6 +27,10 @@ pub struct Fold {
29 pub kind: FoldKind, 27 pub kind: FoldKind,
30} 28}
31 29
30// Feature: Folding
31//
32// Defines folding regions for curly braced blocks, runs of consecutive import
33// statements, and `region` / `endregion` comment markers.
32pub(crate) fn folding_ranges(file: &SourceFile) -> Vec<Fold> { 34pub(crate) fn folding_ranges(file: &SourceFile) -> Vec<Fold> {
33 let mut res = vec![]; 35 let mut res = vec![];
34 let mut visited_comments = FxHashSet::default(); 36 let mut visited_comments = FxHashSet::default();