File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed
crates/ra_hir/src/nameres Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -368,12 +368,43 @@ fn typing_inside_a_function_should_not_invalidate_item_map() {
368
368
mod foo;
369
369
370
370
use crate::foo::bar::Baz;
371
-
371
+ {
372
372
fn foo() -> i32 { 92 }
373
373
" ,
374
374
) ;
375
375
}
376
376
377
+ #[ test]
378
+ fn adding_inner_items_should_not_invalidate_item_map ( ) {
379
+ check_item_map_is_not_recomputed (
380
+ "
381
+ //- /lib.rs
382
+ struct S { a: i32}
383
+ mod foo;<|>
384
+ enum E { A }
385
+ use crate::foo::bar::Baz;
386
+ trait T {
387
+ fn a() {}
388
+ }
389
+ //- /foo/mod.rs
390
+ pub mod bar;
391
+
392
+ //- /foo/bar.rs
393
+ pub struct Baz;
394
+ " ,
395
+ "
396
+ struct S { a: i32, b: () }
397
+ mod foo;<|>
398
+ enum E { A, B }
399
+ use crate::foo::bar::Baz;
400
+ trait T {
401
+ fn a() {}
402
+ fn b() {}
403
+ }
404
+ " ,
405
+ ) ;
406
+ }
407
+
377
408
#[ test]
378
409
fn typing_inside_a_function_inside_a_macro_should_not_invalidate_item_map ( ) {
379
410
check_item_map_is_not_recomputed (
You can’t perform that action at this time.
0 commit comments