aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_dot.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_dot.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_dot.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs
index 27256f879..2325cdf08 100644
--- a/crates/ra_ide_api/src/completion/complete_dot.rs
+++ b/crates/ra_ide_api/src/completion/complete_dot.rs
@@ -68,7 +68,7 @@ fn complete_methods(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty
68#[cfg(test)] 68#[cfg(test)]
69mod tests { 69mod tests {
70 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 70 use crate::completion::{do_completion, CompletionItem, CompletionKind};
71 use insta::assert_debug_snapshot_matches; 71 use insta::assert_debug_snapshot;
72 72
73 fn do_ref_completion(code: &str) -> Vec<CompletionItem> { 73 fn do_ref_completion(code: &str) -> Vec<CompletionItem> {
74 do_completion(code, CompletionKind::Reference) 74 do_completion(code, CompletionKind::Reference)
@@ -76,7 +76,7 @@ mod tests {
76 76
77 #[test] 77 #[test]
78 fn test_struct_field_completion() { 78 fn test_struct_field_completion() {
79 assert_debug_snapshot_matches!( 79 assert_debug_snapshot!(
80 do_ref_completion( 80 do_ref_completion(
81 r" 81 r"
82 struct A { the_field: u32 } 82 struct A { the_field: u32 }
@@ -102,7 +102,7 @@ mod tests {
102 102
103 #[test] 103 #[test]
104 fn test_struct_field_completion_self() { 104 fn test_struct_field_completion_self() {
105 assert_debug_snapshot_matches!( 105 assert_debug_snapshot!(
106 do_ref_completion( 106 do_ref_completion(
107 r" 107 r"
108 struct A { 108 struct A {
@@ -144,7 +144,7 @@ mod tests {
144 144
145 #[test] 145 #[test]
146 fn test_struct_field_completion_autoderef() { 146 fn test_struct_field_completion_autoderef() {
147 assert_debug_snapshot_matches!( 147 assert_debug_snapshot!(
148 do_ref_completion( 148 do_ref_completion(
149 r" 149 r"
150 struct A { the_field: (u32, i32) } 150 struct A { the_field: (u32, i32) }
@@ -180,7 +180,7 @@ mod tests {
180 180
181 #[test] 181 #[test]
182 fn test_no_struct_field_completion_for_method_call() { 182 fn test_no_struct_field_completion_for_method_call() {
183 assert_debug_snapshot_matches!( 183 assert_debug_snapshot!(
184 do_ref_completion( 184 do_ref_completion(
185 r" 185 r"
186 struct A { the_field: u32 } 186 struct A { the_field: u32 }
@@ -195,7 +195,7 @@ mod tests {
195 195
196 #[test] 196 #[test]
197 fn test_method_completion() { 197 fn test_method_completion() {
198 assert_debug_snapshot_matches!( 198 assert_debug_snapshot!(
199 do_ref_completion( 199 do_ref_completion(
200 r" 200 r"
201 struct A {} 201 struct A {}
@@ -224,7 +224,7 @@ mod tests {
224 224
225 #[test] 225 #[test]
226 fn test_trait_method_completion() { 226 fn test_trait_method_completion() {
227 assert_debug_snapshot_matches!( 227 assert_debug_snapshot!(
228 do_ref_completion( 228 do_ref_completion(
229 r" 229 r"
230 struct A {} 230 struct A {}
@@ -252,7 +252,7 @@ mod tests {
252 252
253 #[test] 253 #[test]
254 fn test_trait_method_completion_deduplicated() { 254 fn test_trait_method_completion_deduplicated() {
255 assert_debug_snapshot_matches!( 255 assert_debug_snapshot!(
256 do_ref_completion( 256 do_ref_completion(
257 r" 257 r"
258 struct A {} 258 struct A {}
@@ -280,7 +280,7 @@ mod tests {
280 280
281 #[test] 281 #[test]
282 fn test_no_non_self_method() { 282 fn test_no_non_self_method() {
283 assert_debug_snapshot_matches!( 283 assert_debug_snapshot!(
284 do_ref_completion( 284 do_ref_completion(
285 r" 285 r"
286 struct A {} 286 struct A {}
@@ -298,7 +298,7 @@ mod tests {
298 298
299 #[test] 299 #[test]
300 fn test_method_attr_filtering() { 300 fn test_method_attr_filtering() {
301 assert_debug_snapshot_matches!( 301 assert_debug_snapshot!(
302 do_ref_completion( 302 do_ref_completion(
303 r" 303 r"
304 struct A {} 304 struct A {}
@@ -331,7 +331,7 @@ mod tests {
331 331
332 #[test] 332 #[test]
333 fn test_tuple_field_completion() { 333 fn test_tuple_field_completion() {
334 assert_debug_snapshot_matches!( 334 assert_debug_snapshot!(
335 do_ref_completion( 335 do_ref_completion(
336 r" 336 r"
337 fn foo() { 337 fn foo() {
@@ -365,7 +365,7 @@ mod tests {
365 365
366 #[test] 366 #[test]
367 fn test_tuple_field_inference() { 367 fn test_tuple_field_inference() {
368 assert_debug_snapshot_matches!( 368 assert_debug_snapshot!(
369 do_ref_completion( 369 do_ref_completion(
370 r" 370 r"
371 pub struct S; 371 pub struct S;
@@ -400,7 +400,7 @@ mod tests {
400 400
401 #[test] 401 #[test]
402 fn test_completion_works_in_consts() { 402 fn test_completion_works_in_consts() {
403 assert_debug_snapshot_matches!( 403 assert_debug_snapshot!(
404 do_ref_completion( 404 do_ref_completion(
405 r" 405 r"
406 struct A { the_field: u32 } 406 struct A { the_field: u32 }
@@ -426,7 +426,7 @@ mod tests {
426 426
427 #[test] 427 #[test]
428 fn test_completion_await_impls_future() { 428 fn test_completion_await_impls_future() {
429 assert_debug_snapshot_matches!( 429 assert_debug_snapshot!(
430 do_completion( 430 do_completion(
431 r###" 431 r###"
432 //- /main.rs 432 //- /main.rs