diff options
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/tests.rs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs index a19a6fe51..17de54b44 100644 --- a/crates/ra_hir/src/nameres/tests.rs +++ b/crates/ra_hir/src/nameres/tests.rs | |||
@@ -368,7 +368,7 @@ fn typing_inside_a_function_should_not_invalidate_item_map() { | |||
368 | mod foo; | 368 | mod foo; |
369 | 369 | ||
370 | use crate::foo::bar::Baz; | 370 | use crate::foo::bar::Baz; |
371 | { | 371 | |
372 | fn foo() -> i32 { 92 } | 372 | fn foo() -> i32 { 92 } |
373 | ", | 373 | ", |
374 | ); | 374 | ); |
@@ -380,12 +380,15 @@ fn adding_inner_items_should_not_invalidate_item_map() { | |||
380 | " | 380 | " |
381 | //- /lib.rs | 381 | //- /lib.rs |
382 | struct S { a: i32} | 382 | struct S { a: i32} |
383 | mod foo;<|> | ||
384 | enum E { A } | 383 | enum E { A } |
385 | use crate::foo::bar::Baz; | ||
386 | trait T { | 384 | trait T { |
387 | fn a() {} | 385 | fn a() {} |
388 | } | 386 | } |
387 | mod foo;<|> | ||
388 | impl S { | ||
389 | fn a() {} | ||
390 | } | ||
391 | use crate::foo::bar::Baz; | ||
389 | //- /foo/mod.rs | 392 | //- /foo/mod.rs |
390 | pub mod bar; | 393 | pub mod bar; |
391 | 394 | ||
@@ -394,13 +397,17 @@ fn adding_inner_items_should_not_invalidate_item_map() { | |||
394 | ", | 397 | ", |
395 | " | 398 | " |
396 | struct S { a: i32, b: () } | 399 | struct S { a: i32, b: () } |
397 | mod foo;<|> | ||
398 | enum E { A, B } | 400 | enum E { A, B } |
399 | use crate::foo::bar::Baz; | ||
400 | trait T { | 401 | trait T { |
401 | fn a() {} | 402 | fn a() {} |
402 | fn b() {} | 403 | fn b() {} |
403 | } | 404 | } |
405 | mod foo;<|> | ||
406 | impl S { | ||
407 | fn a() {} | ||
408 | fn b() {} | ||
409 | } | ||
410 | use crate::foo::bar::Baz; | ||
404 | ", | 411 | ", |
405 | ); | 412 | ); |
406 | } | 413 | } |