diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-24 10:34:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-24 10:34:25 +0100 |
commit | 7c28d060b5a5c4e7004282aa6827c3023c5b03c8 (patch) | |
tree | 0ed66d422a10a9f192a039565ac70b85dbdf80f8 /crates/ra_ide/src/completion/complete_qualified_path.rs | |
parent | 15c71f881607db5ddfd759785f62e4ae44aaf301 (diff) | |
parent | c749fe223bf5a41709a4bc91d0f56dafc4201658 (diff) |
Merge #5021
5021: Reduce code dupication around fixtures r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/completion/complete_qualified_path.rs')
-rw-r--r-- | crates/ra_ide/src/completion/complete_qualified_path.rs | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/crates/ra_ide/src/completion/complete_qualified_path.rs b/crates/ra_ide/src/completion/complete_qualified_path.rs index d3a1cbc1d..f133ce3ce 100644 --- a/crates/ra_ide/src/completion/complete_qualified_path.rs +++ b/crates/ra_ide/src/completion/complete_qualified_path.rs | |||
@@ -212,8 +212,8 @@ mod tests { | |||
212 | [ | 212 | [ |
213 | CompletionItem { | 213 | CompletionItem { |
214 | label: "my", | 214 | label: "my", |
215 | source_range: 27..29, | 215 | source_range: 10..12, |
216 | delete: 27..29, | 216 | delete: 10..12, |
217 | insert: "my", | 217 | insert: "my", |
218 | kind: Module, | 218 | kind: Module, |
219 | documentation: Documentation( | 219 | documentation: Documentation( |
@@ -243,8 +243,8 @@ mod tests { | |||
243 | [ | 243 | [ |
244 | CompletionItem { | 244 | CompletionItem { |
245 | label: "Bar", | 245 | label: "Bar", |
246 | source_range: 31..31, | 246 | source_range: 14..14, |
247 | delete: 31..31, | 247 | delete: 14..14, |
248 | insert: "Bar", | 248 | insert: "Bar", |
249 | kind: Struct, | 249 | kind: Struct, |
250 | }, | 250 | }, |
@@ -271,15 +271,15 @@ mod tests { | |||
271 | [ | 271 | [ |
272 | CompletionItem { | 272 | CompletionItem { |
273 | label: "Foo", | 273 | label: "Foo", |
274 | source_range: 31..31, | 274 | source_range: 14..14, |
275 | delete: 31..31, | 275 | delete: 14..14, |
276 | insert: "Foo", | 276 | insert: "Foo", |
277 | kind: Struct, | 277 | kind: Struct, |
278 | }, | 278 | }, |
279 | CompletionItem { | 279 | CompletionItem { |
280 | label: "PublicBar", | 280 | label: "PublicBar", |
281 | source_range: 31..31, | 281 | source_range: 14..14, |
282 | delete: 31..31, | 282 | delete: 14..14, |
283 | insert: "PublicBar", | 283 | insert: "PublicBar", |
284 | kind: Struct, | 284 | kind: Struct, |
285 | }, | 285 | }, |
@@ -304,8 +304,8 @@ mod tests { | |||
304 | [ | 304 | [ |
305 | CompletionItem { | 305 | CompletionItem { |
306 | label: "Bar", | 306 | label: "Bar", |
307 | source_range: 30..30, | 307 | source_range: 13..13, |
308 | delete: 30..30, | 308 | delete: 13..13, |
309 | insert: "Bar", | 309 | insert: "Bar", |
310 | kind: Struct, | 310 | kind: Struct, |
311 | }, | 311 | }, |
@@ -1145,8 +1145,8 @@ mod tests { | |||
1145 | [ | 1145 | [ |
1146 | CompletionItem { | 1146 | CompletionItem { |
1147 | label: "bar()", | 1147 | label: "bar()", |
1148 | source_range: 185..185, | 1148 | source_range: 88..88, |
1149 | delete: 185..185, | 1149 | delete: 88..88, |
1150 | insert: "bar()$0", | 1150 | insert: "bar()$0", |
1151 | kind: Function, | 1151 | kind: Function, |
1152 | lookup: "bar", | 1152 | lookup: "bar", |
@@ -1154,8 +1154,8 @@ mod tests { | |||
1154 | }, | 1154 | }, |
1155 | CompletionItem { | 1155 | CompletionItem { |
1156 | label: "foo()", | 1156 | label: "foo()", |
1157 | source_range: 185..185, | 1157 | source_range: 88..88, |
1158 | delete: 185..185, | 1158 | delete: 88..88, |
1159 | insert: "foo()$0", | 1159 | insert: "foo()$0", |
1160 | kind: Function, | 1160 | kind: Function, |
1161 | lookup: "foo", | 1161 | lookup: "foo", |
@@ -1185,16 +1185,16 @@ mod tests { | |||
1185 | [ | 1185 | [ |
1186 | CompletionItem { | 1186 | CompletionItem { |
1187 | label: "foo!(…)", | 1187 | label: "foo!(…)", |
1188 | source_range: 179..179, | 1188 | source_range: 82..82, |
1189 | delete: 179..179, | 1189 | delete: 82..82, |
1190 | insert: "foo!($0)", | 1190 | insert: "foo!($0)", |
1191 | kind: Macro, | 1191 | kind: Macro, |
1192 | detail: "#[macro_export]\nmacro_rules! foo", | 1192 | detail: "#[macro_export]\nmacro_rules! foo", |
1193 | }, | 1193 | }, |
1194 | CompletionItem { | 1194 | CompletionItem { |
1195 | label: "main()", | 1195 | label: "main()", |
1196 | source_range: 179..179, | 1196 | source_range: 82..82, |
1197 | delete: 179..179, | 1197 | delete: 82..82, |
1198 | insert: "main()$0", | 1198 | insert: "main()$0", |
1199 | kind: Function, | 1199 | kind: Function, |
1200 | lookup: "main", | 1200 | lookup: "main", |
@@ -1230,22 +1230,22 @@ mod tests { | |||
1230 | [ | 1230 | [ |
1231 | CompletionItem { | 1231 | CompletionItem { |
1232 | label: "RIGHT_CONST", | 1232 | label: "RIGHT_CONST", |
1233 | source_range: 57..57, | 1233 | source_range: 24..24, |
1234 | delete: 57..57, | 1234 | delete: 24..24, |
1235 | insert: "RIGHT_CONST", | 1235 | insert: "RIGHT_CONST", |
1236 | kind: Const, | 1236 | kind: Const, |
1237 | }, | 1237 | }, |
1238 | CompletionItem { | 1238 | CompletionItem { |
1239 | label: "RightType", | 1239 | label: "RightType", |
1240 | source_range: 57..57, | 1240 | source_range: 24..24, |
1241 | delete: 57..57, | 1241 | delete: 24..24, |
1242 | insert: "RightType", | 1242 | insert: "RightType", |
1243 | kind: Struct, | 1243 | kind: Struct, |
1244 | }, | 1244 | }, |
1245 | CompletionItem { | 1245 | CompletionItem { |
1246 | label: "right_fn()", | 1246 | label: "right_fn()", |
1247 | source_range: 57..57, | 1247 | source_range: 24..24, |
1248 | delete: 57..57, | 1248 | delete: 24..24, |
1249 | insert: "right_fn()$0", | 1249 | insert: "right_fn()$0", |
1250 | kind: Function, | 1250 | kind: Function, |
1251 | lookup: "right_fn", | 1251 | lookup: "right_fn", |
@@ -1269,8 +1269,8 @@ mod tests { | |||
1269 | [ | 1269 | [ |
1270 | CompletionItem { | 1270 | CompletionItem { |
1271 | label: "foo()", | 1271 | label: "foo()", |
1272 | source_range: 93..94, | 1272 | source_range: 60..61, |
1273 | delete: 93..94, | 1273 | delete: 60..61, |
1274 | insert: "foo()$0", | 1274 | insert: "foo()$0", |
1275 | kind: Function, | 1275 | kind: Function, |
1276 | lookup: "foo", | 1276 | lookup: "foo", |
@@ -1278,8 +1278,8 @@ mod tests { | |||
1278 | }, | 1278 | }, |
1279 | CompletionItem { | 1279 | CompletionItem { |
1280 | label: "main()", | 1280 | label: "main()", |
1281 | source_range: 93..94, | 1281 | source_range: 60..61, |
1282 | delete: 93..94, | 1282 | delete: 60..61, |
1283 | insert: "main()$0", | 1283 | insert: "main()$0", |
1284 | kind: Function, | 1284 | kind: Function, |
1285 | lookup: "main", | 1285 | lookup: "main", |
@@ -1308,15 +1308,15 @@ mod tests { | |||
1308 | [ | 1308 | [ |
1309 | CompletionItem { | 1309 | CompletionItem { |
1310 | label: "z", | 1310 | label: "z", |
1311 | source_range: 57..57, | 1311 | source_range: 24..24, |
1312 | delete: 57..57, | 1312 | delete: 24..24, |
1313 | insert: "z", | 1313 | insert: "z", |
1314 | kind: Module, | 1314 | kind: Module, |
1315 | }, | 1315 | }, |
1316 | CompletionItem { | 1316 | CompletionItem { |
1317 | label: "z()", | 1317 | label: "z()", |
1318 | source_range: 57..57, | 1318 | source_range: 24..24, |
1319 | delete: 57..57, | 1319 | delete: 24..24, |
1320 | insert: "z()$0", | 1320 | insert: "z()$0", |
1321 | kind: Function, | 1321 | kind: Function, |
1322 | lookup: "z", | 1322 | lookup: "z", |
@@ -1347,8 +1347,8 @@ mod tests { | |||
1347 | [ | 1347 | [ |
1348 | CompletionItem { | 1348 | CompletionItem { |
1349 | label: "new()", | 1349 | label: "new()", |
1350 | source_range: 292..292, | 1350 | source_range: 179..179, |
1351 | delete: 292..292, | 1351 | delete: 179..179, |
1352 | insert: "new()$0", | 1352 | insert: "new()$0", |
1353 | kind: Function, | 1353 | kind: Function, |
1354 | lookup: "new", | 1354 | lookup: "new", |