Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/references.rs')
| -rw-r--r-- | crates/ide/src/references.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 3684c1033f..fdc5261ac3 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -17,7 +17,7 @@ use ide_db::{ RootDatabase, }; use itertools::Itertools; -use stdx::hash::NoHashHashMap; +use nohash_hasher::IntMap; use syntax::{ algo::find_node_at_offset, ast::{self, HasName}, @@ -31,7 +31,7 @@ use crate::{FilePosition, NavigationTarget, TryToNav}; #[derive(Debug, Clone)] pub struct ReferenceSearchResult { pub declaration: Option<Declaration>, - pub references: NoHashHashMap<FileId, Vec<(TextRange, Option<ReferenceCategory>)>>, + pub references: IntMap<FileId, Vec<(TextRange, Option<ReferenceCategory>)>>, } #[derive(Debug, Clone)] @@ -715,7 +715,7 @@ fn f() { } "#, expect![[r#" - Foo Struct FileId(1) 17..51 28..31 + Foo Struct FileId(1) 17..51 28..31 foo FileId(0) 53..56 FileId(2) 79..82 @@ -803,7 +803,7 @@ pub(super) struct Foo$0 { } "#, expect![[r#" - Foo Struct FileId(2) 0..41 18..21 + Foo Struct FileId(2) 0..41 18..21 some FileId(1) 20..23 Import FileId(1) 47..50 @@ -1289,7 +1289,7 @@ trait Foo where Self$0 { impl Foo for () {} "#, expect![[r#" - Self TypeParam FileId(0) 6..9 6..9 + Self TypeParam FileId(0) 0..44 6..9 FileId(0) 16..20 FileId(0) 37..41 @@ -1380,7 +1380,7 @@ fn foo<T: Bar>(_: impl Bar, _: &dyn Bar) {} trait Foo = where Self$0: ; "#, expect![[r#" - Self TypeParam FileId(0) 6..9 6..9 + Self TypeParam FileId(0) 0..25 6..9 FileId(0) 18..22 "#]], @@ -1542,7 +1542,7 @@ fn f() { FileId(0) 161..165 - func Function FileId(0) 137..146 140..144 + func Function FileId(0) 137..146 140..144 module FileId(0) 181..185 "#]], @@ -1581,7 +1581,7 @@ trait Trait { } "#, expect![[r#" - func Function FileId(0) 48..87 51..55 + func Function FileId(0) 48..87 51..55 Trait FileId(0) 74..78 "#]], @@ -1692,7 +1692,7 @@ fn f<T: Trait>() { } "#, expect![[r#" - CONST Const FileId(0) 18..37 24..29 + CONST Const FileId(0) 18..37 24..29 Trait FileId(0) 71..76 FileId(0) 125..130 @@ -1721,7 +1721,7 @@ fn f<T: Trait>() { } "#, expect![[r#" - TypeAlias TypeAlias FileId(0) 18..33 23..32 + TypeAlias TypeAlias FileId(0) 18..33 23..32 Trait FileId(0) 66..75 FileId(0) 117..126 @@ -1750,7 +1750,7 @@ fn f<T: Trait>() { } "#, expect![[r#" - function Function FileId(0) 18..34 21..29 + function Function FileId(0) 18..34 21..29 Trait FileId(0) 65..73 FileId(0) 112..120 @@ -1894,7 +1894,7 @@ fn f<T: Trait>() { } "#, expect![[r#" - TypeAlias TypeAlias FileId(0) 18..33 23..32 + TypeAlias TypeAlias FileId(0) 18..33 23..32 Trait FileId(0) 66..75 FileId(0) 117..126 @@ -1950,7 +1950,7 @@ impl Foo for Bar { fn method() {} "#, expect![[r#" - method Function FileId(0) 16..39 19..25 + method Function FileId(0) 16..39 19..25 Foo FileId(0) 101..107 "#]], |