File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 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
+
5
7
use std:: mem;
6
8
7
9
use hir:: { DefWithBody , HasSource , ModuleSource , Semantics } ;
@@ -38,6 +40,10 @@ pub enum ReferenceAccess {
38
40
Write ,
39
41
}
40
42
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.
41
47
pub struct SearchScope {
42
48
entries : FxHashMap < FileId , Option < TextRange > > ,
43
49
}
You can’t perform that action at this time.
0 commit comments