Skip to content

Commit 4f50a37

Browse files
committed
Fix docs
1 parent 98d68fa commit 4f50a37

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

crates/ra_ide_db/src/search.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
//! Generally, `search_scope` returns files that might contain references for the element.
2-
//! For `pub(crate)` things it's a crate, for `pub` things it's a crate and dependant crates.
3-
//! In some cases, the location of the references is known to within a `TextRange`,
4-
//! e.g. for things like local variables.
1+
//! Implementation of find-usages functionality.
2+
//!
3+
//! It is based on the standard ide trick: first, we run a fast text search to
4+
//! get a super-set of matches. Then, we we confirm each match using precise
5+
//! name resolution.
6+
57
use std::mem;
68

79
use hir::{DefWithBody, HasSource, ModuleSource, Semantics};
@@ -38,6 +40,10 @@ pub enum ReferenceAccess {
3840
Write,
3941
}
4042

43+
/// Generally, `search_scope` returns files that might contain references for the element.
44+
/// For `pub(crate)` things it's a crate, for `pub` things it's a crate and dependant crates.
45+
/// In some cases, the location of the references is known to within a `TextRange`,
46+
/// e.g. for things like local variables.
4147
pub struct SearchScope {
4248
entries: FxHashMap<FileId, Option<TextRange>>,
4349
}

0 commit comments

Comments
 (0)