Skip to content

Commit e91a855

Browse files
committed
Update tests
1 parent adb0fb0 commit e91a855

File tree

13 files changed

+685
-671
lines changed

13 files changed

+685
-671
lines changed

crates/ide-db/src/navigation_target.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,7 @@ fn orig_range_with_focus(
915915
}
916916
}
917917

918+
// FIXME: Return type should mark each item as being call site, defe site, etc
918919
pub(crate) fn orig_ranges_with_focus_in(
919920
db: &RootDatabase,
920921
hir_file: HirFileId,
@@ -957,14 +958,13 @@ pub(crate) fn orig_ranges_with_focus_in(
957958
let arg_map = db.expansion_span_map(parent);
958959
let arg_node = current.call_node(db);
959960
let arg_range = arg_node.text_range();
960-
break Some(
961-
arg_map
962-
.ranges_with_span_exact(span)
963-
.filter(|(range, _)| range.intersect(arg_range).is_some())
964-
.map(TupleExt::head)
965-
.zip(iter::repeat(None))
966-
.collect(),
967-
);
961+
let res = arg_map
962+
.ranges_with_span_exact(span)
963+
.filter(|(range, _)| range.intersect(arg_range).is_some())
964+
.map(TupleExt::head)
965+
.zip(iter::repeat(None))
966+
.collect::<Vec<_>>();
967+
break res.is_empty().then_some(res);
968968
}
969969
current = parent;
970970
}

crates/ide-db/src/test_data/test_doc_alias.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Module {
44
id: ModuleId {
55
krate: Crate(
6-
Id(3000),
6+
Id(2800),
77
),
88
block: None,
99
local_id: Idx::<ModuleData>(0),
@@ -16,15 +16,15 @@
1616
Struct(
1717
Struct {
1818
id: StructId(
19-
3401,
19+
2c01,
2020
),
2121
},
2222
),
2323
),
2424
loc: DeclarationLocation {
2525
hir_file_id: FileId(
2626
EditionedFileId(
27-
Id(2000),
27+
Id(1800),
2828
),
2929
),
3030
ptr: SyntaxNodePtr {
@@ -50,15 +50,15 @@
5050
Struct(
5151
Struct {
5252
id: StructId(
53-
3400,
53+
2c00,
5454
),
5555
},
5656
),
5757
),
5858
loc: DeclarationLocation {
5959
hir_file_id: FileId(
6060
EditionedFileId(
61-
Id(2000),
61+
Id(1800),
6262
),
6363
),
6464
ptr: SyntaxNodePtr {
@@ -84,15 +84,15 @@
8484
Struct(
8585
Struct {
8686
id: StructId(
87-
3400,
87+
2c00,
8888
),
8989
},
9090
),
9191
),
9292
loc: DeclarationLocation {
9393
hir_file_id: FileId(
9494
EditionedFileId(
95-
Id(2000),
95+
Id(1800),
9696
),
9797
),
9898
ptr: SyntaxNodePtr {
@@ -118,15 +118,15 @@
118118
Struct(
119119
Struct {
120120
id: StructId(
121-
3400,
121+
2c00,
122122
),
123123
},
124124
),
125125
),
126126
loc: DeclarationLocation {
127127
hir_file_id: FileId(
128128
EditionedFileId(
129-
Id(2000),
129+
Id(1800),
130130
),
131131
),
132132
ptr: SyntaxNodePtr {
@@ -152,15 +152,15 @@
152152
Struct(
153153
Struct {
154154
id: StructId(
155-
3400,
155+
2c00,
156156
),
157157
},
158158
),
159159
),
160160
loc: DeclarationLocation {
161161
hir_file_id: FileId(
162162
EditionedFileId(
163-
Id(2000),
163+
Id(1800),
164164
),
165165
),
166166
ptr: SyntaxNodePtr {
@@ -186,15 +186,15 @@
186186
Struct(
187187
Struct {
188188
id: StructId(
189-
3401,
189+
2c01,
190190
),
191191
},
192192
),
193193
),
194194
loc: DeclarationLocation {
195195
hir_file_id: FileId(
196196
EditionedFileId(
197-
Id(2000),
197+
Id(1800),
198198
),
199199
),
200200
ptr: SyntaxNodePtr {
@@ -220,15 +220,15 @@
220220
Struct(
221221
Struct {
222222
id: StructId(
223-
3400,
223+
2c00,
224224
),
225225
},
226226
),
227227
),
228228
loc: DeclarationLocation {
229229
hir_file_id: FileId(
230230
EditionedFileId(
231-
Id(2000),
231+
Id(1800),
232232
),
233233
),
234234
ptr: SyntaxNodePtr {

0 commit comments

Comments
 (0)