aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_scope.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_scope.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_scope.rs b/crates/ra_ide_api/src/completion/complete_scope.rs
index 2000d953a..d6a44c3e0 100644
--- a/crates/ra_ide_api/src/completion/complete_scope.rs
+++ b/crates/ra_ide_api/src/completion/complete_scope.rs
@@ -122,7 +122,7 @@ impl ImportResolver {
122#[cfg(test)] 122#[cfg(test)]
123mod tests { 123mod tests {
124 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 124 use crate::completion::{do_completion, CompletionItem, CompletionKind};
125 use insta::assert_debug_snapshot_matches; 125 use insta::assert_debug_snapshot;
126 126
127 fn do_reference_completion(code: &str) -> Vec<CompletionItem> { 127 fn do_reference_completion(code: &str) -> Vec<CompletionItem> {
128 do_completion(code, CompletionKind::Reference) 128 do_completion(code, CompletionKind::Reference)
@@ -130,7 +130,7 @@ mod tests {
130 130
131 #[test] 131 #[test]
132 fn completes_bindings_from_let() { 132 fn completes_bindings_from_let() {
133 assert_debug_snapshot_matches!( 133 assert_debug_snapshot!(
134 do_reference_completion( 134 do_reference_completion(
135 r" 135 r"
136 fn quux(x: i32) { 136 fn quux(x: i32) {
@@ -171,7 +171,7 @@ mod tests {
171 171
172 #[test] 172 #[test]
173 fn completes_bindings_from_if_let() { 173 fn completes_bindings_from_if_let() {
174 assert_debug_snapshot_matches!( 174 assert_debug_snapshot!(
175 do_reference_completion( 175 do_reference_completion(
176 r" 176 r"
177 fn quux() { 177 fn quux() {
@@ -215,7 +215,7 @@ mod tests {
215 215
216 #[test] 216 #[test]
217 fn completes_bindings_from_for() { 217 fn completes_bindings_from_for() {
218 assert_debug_snapshot_matches!( 218 assert_debug_snapshot!(
219 do_reference_completion( 219 do_reference_completion(
220 r" 220 r"
221 fn quux() { 221 fn quux() {
@@ -247,7 +247,7 @@ mod tests {
247 247
248 #[test] 248 #[test]
249 fn completes_generic_params() { 249 fn completes_generic_params() {
250 assert_debug_snapshot_matches!( 250 assert_debug_snapshot!(
251 do_reference_completion( 251 do_reference_completion(
252 r" 252 r"
253 fn quux<T>() { 253 fn quux<T>() {
@@ -277,7 +277,7 @@ mod tests {
277 277
278 #[test] 278 #[test]
279 fn completes_generic_params_in_struct() { 279 fn completes_generic_params_in_struct() {
280 assert_debug_snapshot_matches!( 280 assert_debug_snapshot!(
281 do_reference_completion( 281 do_reference_completion(
282 r" 282 r"
283 struct X<T> { 283 struct X<T> {
@@ -306,7 +306,7 @@ mod tests {
306 306
307 #[test] 307 #[test]
308 fn completes_module_items() { 308 fn completes_module_items() {
309 assert_debug_snapshot_matches!( 309 assert_debug_snapshot!(
310 do_reference_completion( 310 do_reference_completion(
311 r" 311 r"
312 struct Foo; 312 struct Foo;
@@ -345,7 +345,7 @@ mod tests {
345 345
346 #[test] 346 #[test]
347 fn completes_extern_prelude() { 347 fn completes_extern_prelude() {
348 assert_debug_snapshot_matches!( 348 assert_debug_snapshot!(
349 do_reference_completion( 349 do_reference_completion(
350 r" 350 r"
351 //- /lib.rs 351 //- /lib.rs
@@ -369,7 +369,7 @@ mod tests {
369 369
370 #[test] 370 #[test]
371 fn completes_module_items_in_nested_modules() { 371 fn completes_module_items_in_nested_modules() {
372 assert_debug_snapshot_matches!( 372 assert_debug_snapshot!(
373 do_reference_completion( 373 do_reference_completion(
374 r" 374 r"
375 struct Foo; 375 struct Foo;
@@ -401,7 +401,7 @@ mod tests {
401 401
402 #[test] 402 #[test]
403 fn completes_return_type() { 403 fn completes_return_type() {
404 assert_debug_snapshot_matches!( 404 assert_debug_snapshot!(
405 do_reference_completion( 405 do_reference_completion(
406 r" 406 r"
407 struct Foo; 407 struct Foo;
@@ -430,7 +430,7 @@ mod tests {
430 430
431 #[test] 431 #[test]
432 fn dont_show_both_completions_for_shadowing() { 432 fn dont_show_both_completions_for_shadowing() {
433 assert_debug_snapshot_matches!( 433 assert_debug_snapshot!(
434 do_reference_completion( 434 do_reference_completion(
435 r" 435 r"
436 fn foo() { 436 fn foo() {
@@ -465,7 +465,7 @@ mod tests {
465 465
466 #[test] 466 #[test]
467 fn completes_self_in_methods() { 467 fn completes_self_in_methods() {
468 assert_debug_snapshot_matches!( 468 assert_debug_snapshot!(
469 do_reference_completion(r"impl S { fn foo(&self) { <|> } }"), 469 do_reference_completion(r"impl S { fn foo(&self) { <|> } }"),
470 @r#"[ 470 @r#"[
471 CompletionItem { 471 CompletionItem {
@@ -489,7 +489,7 @@ mod tests {
489 489
490 #[test] 490 #[test]
491 fn completes_prelude() { 491 fn completes_prelude() {
492 assert_debug_snapshot_matches!( 492 assert_debug_snapshot!(
493 do_reference_completion( 493 do_reference_completion(
494 " 494 "
495 //- /main.rs 495 //- /main.rs