aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-08-29 15:04:28 +0100
committerGitHub <[email protected]>2019-08-29 15:04:28 +0100
commit7d72ca80003b7915ed7fc64907b5b6dc5c88dacd (patch)
tree4aa7826d1b9a7222ad64085f136a1615d7daa7a5 /crates/ra_ide_api
parent5a99184967c89992df4544d0c1ca27d79946a1a7 (diff)
parent0f6c048ce1a621ccd3e2080ec5aafbd053c516f4 (diff)
Merge #1738
1738: :arrow_up: insta r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/Cargo.toml2
-rw-r--r--crates/ra_ide_api/src/completion/complete_dot.rs28
-rw-r--r--crates/ra_ide_api/src/completion/complete_fn_param.rs8
-rw-r--r--crates/ra_ide_api/src/completion/complete_keyword.rs28
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs30
-rw-r--r--crates/ra_ide_api/src/completion/complete_pattern.rs4
-rw-r--r--crates/ra_ide_api/src/completion/complete_postfix.rs6
-rw-r--r--crates/ra_ide_api/src/completion/complete_record_literal.rs10
-rw-r--r--crates/ra_ide_api/src/completion/complete_record_pattern.rs6
-rw-r--r--crates/ra_ide_api/src/completion/complete_scope.rs26
-rw-r--r--crates/ra_ide_api/src/completion/complete_snippet.rs10
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs14
-rw-r--r--crates/ra_ide_api/src/diagnostics.rs4
-rw-r--r--crates/ra_ide_api/src/display/structure.rs4
-rw-r--r--crates/ra_ide_api/src/inlay_hints.rs14
-rw-r--r--crates/ra_ide_api/src/references.rs6
-rw-r--r--crates/ra_ide_api/src/runnables.rs10
17 files changed, 105 insertions, 105 deletions
diff --git a/crates/ra_ide_api/Cargo.toml b/crates/ra_ide_api/Cargo.toml
index a7dc0b63a..000694620 100644
--- a/crates/ra_ide_api/Cargo.toml
+++ b/crates/ra_ide_api/Cargo.toml
@@ -27,7 +27,7 @@ test_utils = { path = "../test_utils" }
27ra_assists = { path = "../ra_assists" } 27ra_assists = { path = "../ra_assists" }
28 28
29[dev-dependencies] 29[dev-dependencies]
30insta = "0.10.0" 30insta = "0.11.0"
31 31
32[dev-dependencies.proptest] 32[dev-dependencies.proptest]
33version = "0.9.0" 33version = "0.9.0"
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
diff --git a/crates/ra_ide_api/src/completion/complete_fn_param.rs b/crates/ra_ide_api/src/completion/complete_fn_param.rs
index 0887ef1f6..6639b6fff 100644
--- a/crates/ra_ide_api/src/completion/complete_fn_param.rs
+++ b/crates/ra_ide_api/src/completion/complete_fn_param.rs
@@ -51,7 +51,7 @@ pub(super) fn complete_fn_param(acc: &mut Completions, ctx: &CompletionContext)
51#[cfg(test)] 51#[cfg(test)]
52mod tests { 52mod tests {
53 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 53 use crate::completion::{do_completion, CompletionItem, CompletionKind};
54 use insta::assert_debug_snapshot_matches; 54 use insta::assert_debug_snapshot;
55 55
56 fn do_magic_completion(code: &str) -> Vec<CompletionItem> { 56 fn do_magic_completion(code: &str) -> Vec<CompletionItem> {
57 do_completion(code, CompletionKind::Magic) 57 do_completion(code, CompletionKind::Magic)
@@ -59,7 +59,7 @@ mod tests {
59 59
60 #[test] 60 #[test]
61 fn test_param_completion_last_param() { 61 fn test_param_completion_last_param() {
62 assert_debug_snapshot_matches!( 62 assert_debug_snapshot!(
63 do_magic_completion( 63 do_magic_completion(
64 r" 64 r"
65 fn foo(file_id: FileId) {} 65 fn foo(file_id: FileId) {}
@@ -83,7 +83,7 @@ mod tests {
83 83
84 #[test] 84 #[test]
85 fn test_param_completion_nth_param() { 85 fn test_param_completion_nth_param() {
86 assert_debug_snapshot_matches!( 86 assert_debug_snapshot!(
87 do_magic_completion( 87 do_magic_completion(
88 r" 88 r"
89 fn foo(file_id: FileId) {} 89 fn foo(file_id: FileId) {}
@@ -107,7 +107,7 @@ mod tests {
107 107
108 #[test] 108 #[test]
109 fn test_param_completion_trait_param() { 109 fn test_param_completion_trait_param() {
110 assert_debug_snapshot_matches!( 110 assert_debug_snapshot!(
111 do_magic_completion( 111 do_magic_completion(
112 r" 112 r"
113 pub(crate) trait SourceRoot { 113 pub(crate) trait SourceRoot {
diff --git a/crates/ra_ide_api/src/completion/complete_keyword.rs b/crates/ra_ide_api/src/completion/complete_keyword.rs
index 18c1839dc..c527a9f63 100644
--- a/crates/ra_ide_api/src/completion/complete_keyword.rs
+++ b/crates/ra_ide_api/src/completion/complete_keyword.rs
@@ -113,7 +113,7 @@ fn complete_return(
113#[cfg(test)] 113#[cfg(test)]
114mod tests { 114mod tests {
115 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 115 use crate::completion::{do_completion, CompletionItem, CompletionKind};
116 use insta::assert_debug_snapshot_matches; 116 use insta::assert_debug_snapshot;
117 117
118 fn do_keyword_completion(code: &str) -> Vec<CompletionItem> { 118 fn do_keyword_completion(code: &str) -> Vec<CompletionItem> {
119 do_completion(code, CompletionKind::Keyword) 119 do_completion(code, CompletionKind::Keyword)
@@ -121,7 +121,7 @@ mod tests {
121 121
122 #[test] 122 #[test]
123 fn completes_keywords_in_use_stmt() { 123 fn completes_keywords_in_use_stmt() {
124 assert_debug_snapshot_matches!( 124 assert_debug_snapshot!(
125 do_keyword_completion( 125 do_keyword_completion(
126 r" 126 r"
127 use <|> 127 use <|>
@@ -152,7 +152,7 @@ mod tests {
152]"### 152]"###
153 ); 153 );
154 154
155 assert_debug_snapshot_matches!( 155 assert_debug_snapshot!(
156 do_keyword_completion( 156 do_keyword_completion(
157 r" 157 r"
158 use a::<|> 158 use a::<|>
@@ -176,7 +176,7 @@ mod tests {
176]"### 176]"###
177 ); 177 );
178 178
179 assert_debug_snapshot_matches!( 179 assert_debug_snapshot!(
180 do_keyword_completion( 180 do_keyword_completion(
181 r" 181 r"
182 use a::{b, <|>} 182 use a::{b, <|>}
@@ -203,7 +203,7 @@ mod tests {
203 203
204 #[test] 204 #[test]
205 fn completes_various_keywords_in_function() { 205 fn completes_various_keywords_in_function() {
206 assert_debug_snapshot_matches!( 206 assert_debug_snapshot!(
207 do_keyword_completion( 207 do_keyword_completion(
208 r" 208 r"
209 fn quux() { 209 fn quux() {
@@ -253,7 +253,7 @@ mod tests {
253 253
254 #[test] 254 #[test]
255 fn completes_else_after_if() { 255 fn completes_else_after_if() {
256 assert_debug_snapshot_matches!( 256 assert_debug_snapshot!(
257 do_keyword_completion( 257 do_keyword_completion(
258 r" 258 r"
259 fn quux() { 259 fn quux() {
@@ -319,7 +319,7 @@ mod tests {
319 319
320 #[test] 320 #[test]
321 fn test_completion_return_value() { 321 fn test_completion_return_value() {
322 assert_debug_snapshot_matches!( 322 assert_debug_snapshot!(
323 do_keyword_completion( 323 do_keyword_completion(
324 r" 324 r"
325 fn quux() -> i32 { 325 fn quux() -> i32 {
@@ -366,7 +366,7 @@ mod tests {
366 }, 366 },
367]"### 367]"###
368 ); 368 );
369 assert_debug_snapshot_matches!( 369 assert_debug_snapshot!(
370 do_keyword_completion( 370 do_keyword_completion(
371 r" 371 r"
372 fn quux() { 372 fn quux() {
@@ -417,7 +417,7 @@ mod tests {
417 417
418 #[test] 418 #[test]
419 fn dont_add_semi_after_return_if_not_a_statement() { 419 fn dont_add_semi_after_return_if_not_a_statement() {
420 assert_debug_snapshot_matches!( 420 assert_debug_snapshot!(
421 do_keyword_completion( 421 do_keyword_completion(
422 r" 422 r"
423 fn quux() -> i32 { 423 fn quux() -> i32 {
@@ -469,7 +469,7 @@ mod tests {
469 469
470 #[test] 470 #[test]
471 fn last_return_in_block_has_semi() { 471 fn last_return_in_block_has_semi() {
472 assert_debug_snapshot_matches!( 472 assert_debug_snapshot!(
473 do_keyword_completion( 473 do_keyword_completion(
474 r" 474 r"
475 fn quux() -> i32 { 475 fn quux() -> i32 {
@@ -517,7 +517,7 @@ mod tests {
517 }, 517 },
518]"### 518]"###
519 ); 519 );
520 assert_debug_snapshot_matches!( 520 assert_debug_snapshot!(
521 do_keyword_completion( 521 do_keyword_completion(
522 r" 522 r"
523 fn quux() -> i32 { 523 fn quux() -> i32 {
@@ -571,7 +571,7 @@ mod tests {
571 571
572 #[test] 572 #[test]
573 fn completes_break_and_continue_in_loops() { 573 fn completes_break_and_continue_in_loops() {
574 assert_debug_snapshot_matches!( 574 assert_debug_snapshot!(
575 do_keyword_completion( 575 do_keyword_completion(
576 r" 576 r"
577 fn quux() -> i32 { 577 fn quux() -> i32 {
@@ -633,7 +633,7 @@ mod tests {
633 ); 633 );
634 634
635 // No completion: lambda isolates control flow 635 // No completion: lambda isolates control flow
636 assert_debug_snapshot_matches!( 636 assert_debug_snapshot!(
637 do_keyword_completion( 637 do_keyword_completion(
638 r" 638 r"
639 fn quux() -> i32 { 639 fn quux() -> i32 {
@@ -683,7 +683,7 @@ mod tests {
683 683
684 #[test] 684 #[test]
685 fn no_semi_after_break_continue_in_expr() { 685 fn no_semi_after_break_continue_in_expr() {
686 assert_debug_snapshot_matches!( 686 assert_debug_snapshot!(
687 do_keyword_completion( 687 do_keyword_completion(
688 r" 688 r"
689 fn f() { 689 fn f() {
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index 5fd41eeb3..d6b5ac9ad 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -79,7 +79,7 @@ mod tests {
79 use test_utils::covers; 79 use test_utils::covers;
80 80
81 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 81 use crate::completion::{do_completion, CompletionItem, CompletionKind};
82 use insta::assert_debug_snapshot_matches; 82 use insta::assert_debug_snapshot;
83 83
84 fn do_reference_completion(code: &str) -> Vec<CompletionItem> { 84 fn do_reference_completion(code: &str) -> Vec<CompletionItem> {
85 do_completion(code, CompletionKind::Reference) 85 do_completion(code, CompletionKind::Reference)
@@ -120,7 +120,7 @@ mod tests {
120 120
121 #[test] 121 #[test]
122 fn completes_mod_with_docs() { 122 fn completes_mod_with_docs() {
123 assert_debug_snapshot_matches!( 123 assert_debug_snapshot!(
124 do_reference_completion( 124 do_reference_completion(
125 r" 125 r"
126 use self::my<|>; 126 use self::my<|>;
@@ -149,7 +149,7 @@ mod tests {
149 149
150 #[test] 150 #[test]
151 fn completes_use_item_starting_with_self() { 151 fn completes_use_item_starting_with_self() {
152 assert_debug_snapshot_matches!( 152 assert_debug_snapshot!(
153 do_reference_completion( 153 do_reference_completion(
154 r" 154 r"
155 use self::m::<|>; 155 use self::m::<|>;
@@ -173,7 +173,7 @@ mod tests {
173 173
174 #[test] 174 #[test]
175 fn completes_use_item_starting_with_crate() { 175 fn completes_use_item_starting_with_crate() {
176 assert_debug_snapshot_matches!( 176 assert_debug_snapshot!(
177 do_reference_completion( 177 do_reference_completion(
178 " 178 "
179 //- /lib.rs 179 //- /lib.rs
@@ -204,7 +204,7 @@ mod tests {
204 204
205 #[test] 205 #[test]
206 fn completes_nested_use_tree() { 206 fn completes_nested_use_tree() {
207 assert_debug_snapshot_matches!( 207 assert_debug_snapshot!(
208 do_reference_completion( 208 do_reference_completion(
209 " 209 "
210 //- /lib.rs 210 //- /lib.rs
@@ -235,7 +235,7 @@ mod tests {
235 235
236 #[test] 236 #[test]
237 fn completes_deeply_nested_use_tree() { 237 fn completes_deeply_nested_use_tree() {
238 assert_debug_snapshot_matches!( 238 assert_debug_snapshot!(
239 do_reference_completion( 239 do_reference_completion(
240 " 240 "
241 //- /lib.rs 241 //- /lib.rs
@@ -263,7 +263,7 @@ mod tests {
263 263
264 #[test] 264 #[test]
265 fn completes_enum_variant() { 265 fn completes_enum_variant() {
266 assert_debug_snapshot_matches!( 266 assert_debug_snapshot!(
267 do_reference_completion( 267 do_reference_completion(
268 " 268 "
269 //- /lib.rs 269 //- /lib.rs
@@ -306,7 +306,7 @@ mod tests {
306 306
307 #[test] 307 #[test]
308 fn completes_enum_variant_with_details() { 308 fn completes_enum_variant_with_details() {
309 assert_debug_snapshot_matches!( 309 assert_debug_snapshot!(
310 do_reference_completion( 310 do_reference_completion(
311 " 311 "
312 //- /lib.rs 312 //- /lib.rs
@@ -363,7 +363,7 @@ mod tests {
363 363
364 #[test] 364 #[test]
365 fn completes_struct_associated_method() { 365 fn completes_struct_associated_method() {
366 assert_debug_snapshot_matches!( 366 assert_debug_snapshot!(
367 do_reference_completion( 367 do_reference_completion(
368 " 368 "
369 //- /lib.rs 369 //- /lib.rs
@@ -396,7 +396,7 @@ mod tests {
396 396
397 #[test] 397 #[test]
398 fn completes_struct_associated_const() { 398 fn completes_struct_associated_const() {
399 assert_debug_snapshot_matches!( 399 assert_debug_snapshot!(
400 do_reference_completion( 400 do_reference_completion(
401 " 401 "
402 //- /lib.rs 402 //- /lib.rs
@@ -429,7 +429,7 @@ mod tests {
429 429
430 #[test] 430 #[test]
431 fn completes_struct_associated_type() { 431 fn completes_struct_associated_type() {
432 assert_debug_snapshot_matches!( 432 assert_debug_snapshot!(
433 do_reference_completion( 433 do_reference_completion(
434 " 434 "
435 //- /lib.rs 435 //- /lib.rs
@@ -462,7 +462,7 @@ mod tests {
462 462
463 #[test] 463 #[test]
464 fn completes_enum_associated_method() { 464 fn completes_enum_associated_method() {
465 assert_debug_snapshot_matches!( 465 assert_debug_snapshot!(
466 do_reference_completion( 466 do_reference_completion(
467 " 467 "
468 //- /lib.rs 468 //- /lib.rs
@@ -495,7 +495,7 @@ mod tests {
495 495
496 #[test] 496 #[test]
497 fn completes_union_associated_method() { 497 fn completes_union_associated_method() {
498 assert_debug_snapshot_matches!( 498 assert_debug_snapshot!(
499 do_reference_completion( 499 do_reference_completion(
500 " 500 "
501 //- /lib.rs 501 //- /lib.rs
@@ -528,7 +528,7 @@ mod tests {
528 528
529 #[test] 529 #[test]
530 fn completes_use_paths_across_crates() { 530 fn completes_use_paths_across_crates() {
531 assert_debug_snapshot_matches!( 531 assert_debug_snapshot!(
532 do_reference_completion( 532 do_reference_completion(
533 " 533 "
534 //- /main.rs 534 //- /main.rs
@@ -554,7 +554,7 @@ mod tests {
554 554
555 #[test] 555 #[test]
556 fn completes_type_alias() { 556 fn completes_type_alias() {
557 assert_debug_snapshot_matches!( 557 assert_debug_snapshot!(
558 do_reference_completion( 558 do_reference_completion(
559 " 559 "
560 struct S; 560 struct S;
diff --git a/crates/ra_ide_api/src/completion/complete_pattern.rs b/crates/ra_ide_api/src/completion/complete_pattern.rs
index f12dfcc17..fb02844fa 100644
--- a/crates/ra_ide_api/src/completion/complete_pattern.rs
+++ b/crates/ra_ide_api/src/completion/complete_pattern.rs
@@ -28,7 +28,7 @@ pub(super) fn complete_pattern(acc: &mut Completions, ctx: &CompletionContext) {
28#[cfg(test)] 28#[cfg(test)]
29mod tests { 29mod tests {
30 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 30 use crate::completion::{do_completion, CompletionItem, CompletionKind};
31 use insta::assert_debug_snapshot_matches; 31 use insta::assert_debug_snapshot;
32 32
33 fn complete(code: &str) -> Vec<CompletionItem> { 33 fn complete(code: &str) -> Vec<CompletionItem> {
34 do_completion(code, CompletionKind::Reference) 34 do_completion(code, CompletionKind::Reference)
@@ -53,7 +53,7 @@ mod tests {
53 } 53 }
54 ", 54 ",
55 ); 55 );
56 assert_debug_snapshot_matches!(completions, @r###" 56 assert_debug_snapshot!(completions, @r###"
57 ⋮[ 57 ⋮[
58 ⋮ CompletionItem { 58 ⋮ CompletionItem {
59 ⋮ label: "E", 59 ⋮ label: "E",
diff --git a/crates/ra_ide_api/src/completion/complete_postfix.rs b/crates/ra_ide_api/src/completion/complete_postfix.rs
index 6d834f6ce..3970d1af3 100644
--- a/crates/ra_ide_api/src/completion/complete_postfix.rs
+++ b/crates/ra_ide_api/src/completion/complete_postfix.rs
@@ -72,7 +72,7 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
72#[cfg(test)] 72#[cfg(test)]
73mod tests { 73mod tests {
74 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 74 use crate::completion::{do_completion, CompletionItem, CompletionKind};
75 use insta::assert_debug_snapshot_matches; 75 use insta::assert_debug_snapshot;
76 76
77 fn do_postfix_completion(code: &str) -> Vec<CompletionItem> { 77 fn do_postfix_completion(code: &str) -> Vec<CompletionItem> {
78 do_completion(code, CompletionKind::Postfix) 78 do_completion(code, CompletionKind::Postfix)
@@ -80,7 +80,7 @@ mod tests {
80 80
81 #[test] 81 #[test]
82 fn postfix_completion_works_for_trivial_path_expression() { 82 fn postfix_completion_works_for_trivial_path_expression() {
83 assert_debug_snapshot_matches!( 83 assert_debug_snapshot!(
84 do_postfix_completion( 84 do_postfix_completion(
85 r#" 85 r#"
86 fn main() { 86 fn main() {
@@ -152,7 +152,7 @@ mod tests {
152 152
153 #[test] 153 #[test]
154 fn some_postfix_completions_ignored() { 154 fn some_postfix_completions_ignored() {
155 assert_debug_snapshot_matches!( 155 assert_debug_snapshot!(
156 do_postfix_completion( 156 do_postfix_completion(
157 r#" 157 r#"
158 fn main() { 158 fn main() {
diff --git a/crates/ra_ide_api/src/completion/complete_record_literal.rs b/crates/ra_ide_api/src/completion/complete_record_literal.rs
index 6b929a8ac..ed4029964 100644
--- a/crates/ra_ide_api/src/completion/complete_record_literal.rs
+++ b/crates/ra_ide_api/src/completion/complete_record_literal.rs
@@ -23,7 +23,7 @@ pub(super) fn complete_record_literal(acc: &mut Completions, ctx: &CompletionCon
23#[cfg(test)] 23#[cfg(test)]
24mod tests { 24mod tests {
25 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 25 use crate::completion::{do_completion, CompletionItem, CompletionKind};
26 use insta::assert_debug_snapshot_matches; 26 use insta::assert_debug_snapshot;
27 27
28 fn complete(code: &str) -> Vec<CompletionItem> { 28 fn complete(code: &str) -> Vec<CompletionItem> {
29 do_completion(code, CompletionKind::Reference) 29 do_completion(code, CompletionKind::Reference)
@@ -39,7 +39,7 @@ mod tests {
39 } 39 }
40 ", 40 ",
41 ); 41 );
42 assert_debug_snapshot_matches!(completions, @r###" 42 assert_debug_snapshot!(completions, @r###"
43 ⋮[ 43 ⋮[
44 ⋮ CompletionItem { 44 ⋮ CompletionItem {
45 ⋮ label: "the_field", 45 ⋮ label: "the_field",
@@ -65,7 +65,7 @@ mod tests {
65 } 65 }
66 ", 66 ",
67 ); 67 );
68 assert_debug_snapshot_matches!(completions, @r###" 68 assert_debug_snapshot!(completions, @r###"
69 ⋮[ 69 ⋮[
70 ⋮ CompletionItem { 70 ⋮ CompletionItem {
71 ⋮ label: "a", 71 ⋮ label: "a",
@@ -91,7 +91,7 @@ mod tests {
91 } 91 }
92 ", 92 ",
93 ); 93 );
94 assert_debug_snapshot_matches!(completions, @r###" 94 assert_debug_snapshot!(completions, @r###"
95 ⋮[ 95 ⋮[
96 ⋮ CompletionItem { 96 ⋮ CompletionItem {
97 ⋮ label: "b", 97 ⋮ label: "b",
@@ -116,7 +116,7 @@ mod tests {
116 } 116 }
117 ", 117 ",
118 ); 118 );
119 assert_debug_snapshot_matches!(completions, @r###" 119 assert_debug_snapshot!(completions, @r###"
120 ⋮[ 120 ⋮[
121 ⋮ CompletionItem { 121 ⋮ CompletionItem {
122 ⋮ label: "a", 122 ⋮ label: "a",
diff --git a/crates/ra_ide_api/src/completion/complete_record_pattern.rs b/crates/ra_ide_api/src/completion/complete_record_pattern.rs
index 8c8b47ea4..70716b3d6 100644
--- a/crates/ra_ide_api/src/completion/complete_record_pattern.rs
+++ b/crates/ra_ide_api/src/completion/complete_record_pattern.rs
@@ -22,7 +22,7 @@ pub(super) fn complete_record_pattern(acc: &mut Completions, ctx: &CompletionCon
22#[cfg(test)] 22#[cfg(test)]
23mod tests { 23mod tests {
24 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 24 use crate::completion::{do_completion, CompletionItem, CompletionKind};
25 use insta::assert_debug_snapshot_matches; 25 use insta::assert_debug_snapshot;
26 26
27 fn complete(code: &str) -> Vec<CompletionItem> { 27 fn complete(code: &str) -> Vec<CompletionItem> {
28 do_completion(code, CompletionKind::Reference) 28 do_completion(code, CompletionKind::Reference)
@@ -41,7 +41,7 @@ mod tests {
41 } 41 }
42 ", 42 ",
43 ); 43 );
44 assert_debug_snapshot_matches!(completions, @r###" 44 assert_debug_snapshot!(completions, @r###"
45 ⋮[ 45 ⋮[
46 ⋮ CompletionItem { 46 ⋮ CompletionItem {
47 ⋮ label: "foo", 47 ⋮ label: "foo",
@@ -70,7 +70,7 @@ mod tests {
70 } 70 }
71 ", 71 ",
72 ); 72 );
73 assert_debug_snapshot_matches!(completions, @r###" 73 assert_debug_snapshot!(completions, @r###"
74 ⋮[ 74 ⋮[
75 ⋮ CompletionItem { 75 ⋮ CompletionItem {
76 ⋮ label: "bar", 76 ⋮ label: "bar",
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
diff --git a/crates/ra_ide_api/src/completion/complete_snippet.rs b/crates/ra_ide_api/src/completion/complete_snippet.rs
index a35f31511..b06221c2a 100644
--- a/crates/ra_ide_api/src/completion/complete_snippet.rs
+++ b/crates/ra_ide_api/src/completion/complete_snippet.rs
@@ -40,7 +40,7 @@ fn ${1:feature}() {
40#[cfg(test)] 40#[cfg(test)]
41mod tests { 41mod tests {
42 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 42 use crate::completion::{do_completion, CompletionItem, CompletionKind};
43 use insta::assert_debug_snapshot_matches; 43 use insta::assert_debug_snapshot;
44 44
45 fn do_snippet_completion(code: &str) -> Vec<CompletionItem> { 45 fn do_snippet_completion(code: &str) -> Vec<CompletionItem> {
46 do_completion(code, CompletionKind::Snippet) 46 do_completion(code, CompletionKind::Snippet)
@@ -48,7 +48,7 @@ mod tests {
48 48
49 #[test] 49 #[test]
50 fn completes_snippets_in_expressions() { 50 fn completes_snippets_in_expressions() {
51 assert_debug_snapshot_matches!( 51 assert_debug_snapshot!(
52 do_snippet_completion(r"fn foo(x: i32) { <|> }"), 52 do_snippet_completion(r"fn foo(x: i32) { <|> }"),
53 @r#"[ 53 @r#"[
54 CompletionItem { 54 CompletionItem {
@@ -71,11 +71,11 @@ mod tests {
71 71
72 #[test] 72 #[test]
73 fn should_not_complete_snippets_in_path() { 73 fn should_not_complete_snippets_in_path() {
74 assert_debug_snapshot_matches!( 74 assert_debug_snapshot!(
75 do_snippet_completion(r"fn foo(x: i32) { ::foo<|> }"), 75 do_snippet_completion(r"fn foo(x: i32) { ::foo<|> }"),
76 @r#"[]"# 76 @r#"[]"#
77 ); 77 );
78 assert_debug_snapshot_matches!( 78 assert_debug_snapshot!(
79 do_snippet_completion(r"fn foo(x: i32) { ::<|> }"), 79 do_snippet_completion(r"fn foo(x: i32) { ::<|> }"),
80 @r#"[]"# 80 @r#"[]"#
81 ); 81 );
@@ -83,7 +83,7 @@ mod tests {
83 83
84 #[test] 84 #[test]
85 fn completes_snippets_in_items() { 85 fn completes_snippets_in_items() {
86 assert_debug_snapshot_matches!( 86 assert_debug_snapshot!(
87 do_snippet_completion( 87 do_snippet_completion(
88 r" 88 r"
89 #[cfg(test)] 89 #[cfg(test)]
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs
index 147ceda0c..f19eec9b7 100644
--- a/crates/ra_ide_api/src/completion/presentation.rs
+++ b/crates/ra_ide_api/src/completion/presentation.rs
@@ -186,7 +186,7 @@ impl Completions {
186#[cfg(test)] 186#[cfg(test)]
187mod tests { 187mod tests {
188 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 188 use crate::completion::{do_completion, CompletionItem, CompletionKind};
189 use insta::assert_debug_snapshot_matches; 189 use insta::assert_debug_snapshot;
190 use test_utils::covers; 190 use test_utils::covers;
191 191
192 fn do_reference_completion(code: &str) -> Vec<CompletionItem> { 192 fn do_reference_completion(code: &str) -> Vec<CompletionItem> {
@@ -196,7 +196,7 @@ mod tests {
196 #[test] 196 #[test]
197 fn inserts_parens_for_function_calls() { 197 fn inserts_parens_for_function_calls() {
198 covers!(inserts_parens_for_function_calls); 198 covers!(inserts_parens_for_function_calls);
199 assert_debug_snapshot_matches!( 199 assert_debug_snapshot!(
200 do_reference_completion( 200 do_reference_completion(
201 r" 201 r"
202 fn no_args() {} 202 fn no_args() {}
@@ -222,7 +222,7 @@ mod tests {
222 }, 222 },
223]"### 223]"###
224 ); 224 );
225 assert_debug_snapshot_matches!( 225 assert_debug_snapshot!(
226 do_reference_completion( 226 do_reference_completion(
227 r" 227 r"
228 fn with_args(x: i32, y: String) {} 228 fn with_args(x: i32, y: String) {}
@@ -248,7 +248,7 @@ mod tests {
248 }, 248 },
249]"### 249]"###
250 ); 250 );
251 assert_debug_snapshot_matches!( 251 assert_debug_snapshot!(
252 do_reference_completion( 252 do_reference_completion(
253 r" 253 r"
254 struct S {} 254 struct S {}
@@ -275,7 +275,7 @@ mod tests {
275 275
276 #[test] 276 #[test]
277 fn dont_render_function_parens_in_use_item() { 277 fn dont_render_function_parens_in_use_item() {
278 assert_debug_snapshot_matches!( 278 assert_debug_snapshot!(
279 do_reference_completion( 279 do_reference_completion(
280 " 280 "
281 //- /lib.rs 281 //- /lib.rs
@@ -298,7 +298,7 @@ mod tests {
298 298
299 #[test] 299 #[test]
300 fn dont_render_function_parens_if_already_call() { 300 fn dont_render_function_parens_if_already_call() {
301 assert_debug_snapshot_matches!( 301 assert_debug_snapshot!(
302 do_reference_completion( 302 do_reference_completion(
303 " 303 "
304 //- /lib.rs 304 //- /lib.rs
@@ -327,7 +327,7 @@ mod tests {
327 }, 327 },
328]"# 328]"#
329 ); 329 );
330 assert_debug_snapshot_matches!( 330 assert_debug_snapshot!(
331 do_reference_completion( 331 do_reference_completion(
332 " 332 "
333 //- /lib.rs 333 //- /lib.rs
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs
index 1a4882824..c448aa8c5 100644
--- a/crates/ra_ide_api/src/diagnostics.rs
+++ b/crates/ra_ide_api/src/diagnostics.rs
@@ -183,7 +183,7 @@ fn check_struct_shorthand_initialization(
183 183
184#[cfg(test)] 184#[cfg(test)]
185mod tests { 185mod tests {
186 use insta::assert_debug_snapshot_matches; 186 use insta::assert_debug_snapshot;
187 use join_to_string::join; 187 use join_to_string::join;
188 use ra_syntax::SourceFile; 188 use ra_syntax::SourceFile;
189 use test_utils::assert_eq_text; 189 use test_utils::assert_eq_text;
@@ -519,7 +519,7 @@ mod tests {
519 fn test_unresolved_module_diagnostic() { 519 fn test_unresolved_module_diagnostic() {
520 let (analysis, file_id) = single_file("mod foo;"); 520 let (analysis, file_id) = single_file("mod foo;");
521 let diagnostics = analysis.diagnostics(file_id).unwrap(); 521 let diagnostics = analysis.diagnostics(file_id).unwrap();
522 assert_debug_snapshot_matches!(diagnostics, @r###" 522 assert_debug_snapshot!(diagnostics, @r###"
523 ⋮[ 523 ⋮[
524 ⋮ Diagnostic { 524 ⋮ Diagnostic {
525 ⋮ message: "unresolved module", 525 ⋮ message: "unresolved module",
diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide_api/src/display/structure.rs
index a2025ed59..be042ed17 100644
--- a/crates/ra_ide_api/src/display/structure.rs
+++ b/crates/ra_ide_api/src/display/structure.rs
@@ -161,7 +161,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
161#[cfg(test)] 161#[cfg(test)]
162mod tests { 162mod tests {
163 use super::*; 163 use super::*;
164 use insta::assert_debug_snapshot_matches; 164 use insta::assert_debug_snapshot;
165 165
166 #[test] 166 #[test]
167 fn test_file_structure() { 167 fn test_file_structure() {
@@ -204,7 +204,7 @@ fn very_obsolete() {}
204 .ok() 204 .ok()
205 .unwrap(); 205 .unwrap();
206 let structure = file_structure(&file); 206 let structure = file_structure(&file);
207 assert_debug_snapshot_matches!(structure, 207 assert_debug_snapshot!(structure,
208 @r#"[ 208 @r#"[
209 StructureNode { 209 StructureNode {
210 parent: None, 210 parent: None,
diff --git a/crates/ra_ide_api/src/inlay_hints.rs b/crates/ra_ide_api/src/inlay_hints.rs
index 61ccb74b6..16bdcf9d1 100644
--- a/crates/ra_ide_api/src/inlay_hints.rs
+++ b/crates/ra_ide_api/src/inlay_hints.rs
@@ -169,7 +169,7 @@ fn get_node_displayable_type(
169#[cfg(test)] 169#[cfg(test)]
170mod tests { 170mod tests {
171 use crate::mock_analysis::single_file; 171 use crate::mock_analysis::single_file;
172 use insta::assert_debug_snapshot_matches; 172 use insta::assert_debug_snapshot;
173 173
174 #[test] 174 #[test]
175 fn let_statement() { 175 fn let_statement() {
@@ -210,7 +210,7 @@ fn main() {
210}"#, 210}"#,
211 ); 211 );
212 212
213 assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ 213 assert_debug_snapshot!(analysis.inlay_hints(file_id).unwrap(), @r#"[
214 InlayHint { 214 InlayHint {
215 range: [193; 197), 215 range: [193; 197),
216 kind: TypeHint, 216 kind: TypeHint,
@@ -277,7 +277,7 @@ fn main() {
277}"#, 277}"#,
278 ); 278 );
279 279
280 assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ 280 assert_debug_snapshot!(analysis.inlay_hints(file_id).unwrap(), @r#"[
281 InlayHint { 281 InlayHint {
282 range: [21; 30), 282 range: [21; 30),
283 kind: TypeHint, 283 kind: TypeHint,
@@ -304,7 +304,7 @@ fn main() {
304}"#, 304}"#,
305 ); 305 );
306 306
307 assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ 307 assert_debug_snapshot!(analysis.inlay_hints(file_id).unwrap(), @r#"[
308 InlayHint { 308 InlayHint {
309 range: [21; 30), 309 range: [21; 30),
310 kind: TypeHint, 310 kind: TypeHint,
@@ -350,7 +350,7 @@ fn main() {
350}"#, 350}"#,
351 ); 351 );
352 352
353 assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ 353 assert_debug_snapshot!(analysis.inlay_hints(file_id).unwrap(), @r#"[
354 InlayHint { 354 InlayHint {
355 range: [166; 170), 355 range: [166; 170),
356 kind: TypeHint, 356 kind: TypeHint,
@@ -411,7 +411,7 @@ fn main() {
411}"#, 411}"#,
412 ); 412 );
413 413
414 assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r###" 414 assert_debug_snapshot!(analysis.inlay_hints(file_id).unwrap(), @r###"
415 ⋮[ 415 ⋮[
416 ⋮ InlayHint { 416 ⋮ InlayHint {
417 ⋮ range: [166; 170), 417 ⋮ range: [166; 170),
@@ -474,7 +474,7 @@ fn main() {
474}"#, 474}"#,
475 ); 475 );
476 476
477 assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ 477 assert_debug_snapshot!(analysis.inlay_hints(file_id).unwrap(), @r#"[
478 InlayHint { 478 InlayHint {
479 range: [311; 315), 479 range: [311; 315),
480 kind: TypeHint, 480 kind: TypeHint,
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs
index 342e73fd3..d8a00067f 100644
--- a/crates/ra_ide_api/src/references.rs
+++ b/crates/ra_ide_api/src/references.rs
@@ -200,7 +200,7 @@ mod tests {
200 mock_analysis::analysis_and_position, mock_analysis::single_file_with_position, FileId, 200 mock_analysis::analysis_and_position, mock_analysis::single_file_with_position, FileId,
201 ReferenceSearchResult, 201 ReferenceSearchResult,
202 }; 202 };
203 use insta::assert_debug_snapshot_matches; 203 use insta::assert_debug_snapshot;
204 use test_utils::assert_eq_text; 204 use test_utils::assert_eq_text;
205 205
206 #[test] 206 #[test]
@@ -341,7 +341,7 @@ mod tests {
341 ); 341 );
342 let new_name = "foo2"; 342 let new_name = "foo2";
343 let source_change = analysis.rename(position, new_name).unwrap(); 343 let source_change = analysis.rename(position, new_name).unwrap();
344 assert_debug_snapshot_matches!(&source_change, 344 assert_debug_snapshot!(&source_change,
345@r#"Some( 345@r#"Some(
346 SourceChange { 346 SourceChange {
347 label: "rename", 347 label: "rename",
@@ -388,7 +388,7 @@ mod tests {
388 ); 388 );
389 let new_name = "foo2"; 389 let new_name = "foo2";
390 let source_change = analysis.rename(position, new_name).unwrap(); 390 let source_change = analysis.rename(position, new_name).unwrap();
391 assert_debug_snapshot_matches!(&source_change, 391 assert_debug_snapshot!(&source_change,
392 @r###"Some( 392 @r###"Some(
393 SourceChange { 393 SourceChange {
394 label: "rename", 394 label: "rename",
diff --git a/crates/ra_ide_api/src/runnables.rs b/crates/ra_ide_api/src/runnables.rs
index 9ea96909e..9d84b3d08 100644
--- a/crates/ra_ide_api/src/runnables.rs
+++ b/crates/ra_ide_api/src/runnables.rs
@@ -71,7 +71,7 @@ fn runnable_mod(db: &RootDatabase, file_id: FileId, module: ast::Module) -> Opti
71 71
72#[cfg(test)] 72#[cfg(test)]
73mod tests { 73mod tests {
74 use insta::assert_debug_snapshot_matches; 74 use insta::assert_debug_snapshot;
75 75
76 use crate::mock_analysis::analysis_and_position; 76 use crate::mock_analysis::analysis_and_position;
77 77
@@ -92,7 +92,7 @@ mod tests {
92 "#, 92 "#,
93 ); 93 );
94 let runnables = analysis.runnables(pos.file_id).unwrap(); 94 let runnables = analysis.runnables(pos.file_id).unwrap();
95 assert_debug_snapshot_matches!(&runnables, 95 assert_debug_snapshot!(&runnables,
96 @r#"[ 96 @r#"[
97 Runnable { 97 Runnable {
98 range: [1; 21), 98 range: [1; 21),
@@ -127,7 +127,7 @@ mod tests {
127 "#, 127 "#,
128 ); 128 );
129 let runnables = analysis.runnables(pos.file_id).unwrap(); 129 let runnables = analysis.runnables(pos.file_id).unwrap();
130 assert_debug_snapshot_matches!(&runnables, 130 assert_debug_snapshot!(&runnables,
131 @r#"[ 131 @r#"[
132 Runnable { 132 Runnable {
133 range: [1; 59), 133 range: [1; 59),
@@ -160,7 +160,7 @@ mod tests {
160 "#, 160 "#,
161 ); 161 );
162 let runnables = analysis.runnables(pos.file_id).unwrap(); 162 let runnables = analysis.runnables(pos.file_id).unwrap();
163 assert_debug_snapshot_matches!(&runnables, 163 assert_debug_snapshot!(&runnables,
164 @r#"[ 164 @r#"[
165 Runnable { 165 Runnable {
166 range: [23; 85), 166 range: [23; 85),
@@ -195,7 +195,7 @@ mod tests {
195 "#, 195 "#,
196 ); 196 );
197 let runnables = analysis.runnables(pos.file_id).unwrap(); 197 let runnables = analysis.runnables(pos.file_id).unwrap();
198 assert_debug_snapshot_matches!(&runnables, 198 assert_debug_snapshot!(&runnables,
199 @r#"[ 199 @r#"[
200 Runnable { 200 Runnable {
201 range: [41; 115), 201 range: [41; 115),