aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir/src/nameres/tests.rs44
1 files changed, 22 insertions, 22 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs
index ac96bea37..0e9026a01 100644
--- a/crates/ra_hir/src/nameres/tests.rs
+++ b/crates/ra_hir/src/nameres/tests.rs
@@ -351,27 +351,25 @@ fn typing_inside_a_function_should_not_invalidate_item_map() {
351 check_item_map_is_not_recomputed( 351 check_item_map_is_not_recomputed(
352 " 352 "
353 //- /lib.rs 353 //- /lib.rs
354 mod foo; 354 mod foo;<|>
355 355
356 use crate::foo::bar::Baz; 356 use crate::foo::bar::Baz;
357 357
358 fn foo() -> i32 {
359 1 + 1
360 }
358 //- /foo/mod.rs 361 //- /foo/mod.rs
359 pub mod bar; 362 pub mod bar;
360 363
361 //- /foo/bar.rs 364 //- /foo/bar.rs
362 <|> 365 pub struct Baz;
363 salsa::query_group! {
364 trait Baz {
365 fn foo() -> i32 { 1 + 1 }
366 }
367 }
368 ", 366 ",
369 " 367 "
370 salsa::query_group! { 368 mod foo;
371 trait Baz { 369
372 fn foo() -> i32 { 92 } 370 use crate::foo::bar::Baz;
373 } 371
374 } 372 fn foo() -> i32 { 92 }
375 ", 373 ",
376 ); 374 );
377} 375}
@@ -381,25 +379,27 @@ fn typing_inside_a_function_inside_a_macro_should_not_invalidate_item_map() {
381 check_item_map_is_not_recomputed( 379 check_item_map_is_not_recomputed(
382 " 380 "
383 //- /lib.rs 381 //- /lib.rs
384 mod foo;<|> 382 mod foo;
385 383
386 use crate::foo::bar::Baz; 384 use crate::foo::bar::Baz;
387 385
388 fn foo() -> i32 {
389 1 + 1
390 }
391 //- /foo/mod.rs 386 //- /foo/mod.rs
392 pub mod bar; 387 pub mod bar;
393 388
394 //- /foo/bar.rs 389 //- /foo/bar.rs
395 pub struct Baz; 390 <|>
391 salsa::query_group! {
392 trait Baz {
393 fn foo() -> i32 { 1 + 1 }
394 }
395 }
396 ", 396 ",
397 " 397 "
398 mod foo; 398 salsa::query_group! {
399 399 trait Baz {
400 use crate::foo::bar::Baz; 400 fn foo() -> i32 { 92 }
401 401 }
402 fn foo() -> i32 { 92 } 402 }
403 ", 403 ",
404 ); 404 );
405} 405}