File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use syntax::{
10
10
} ;
11
11
12
12
use crate :: assist_context:: AssistContext ;
13
+ use test_utils:: mark;
13
14
14
15
/// Determines the containing syntax node in which to insert a `use` statement affecting `position`.
15
16
pub ( crate ) fn find_insert_use_container (
@@ -126,6 +127,7 @@ pub fn try_merge_trees(
126
127
if merge_behaviour == MergeBehaviour :: Last
127
128
&& ( use_tree_list_is_nested ( & lhs_tl) || use_tree_list_is_nested ( & rhs_tl) )
128
129
{
130
+ mark:: hit!( test_last_merge_too_long) ;
129
131
return None ;
130
132
}
131
133
@@ -586,6 +588,17 @@ use std::io;",
586
588
)
587
589
}
588
590
591
+ #[ test]
592
+ fn merge_last_too_long ( ) {
593
+ mark:: check!( test_last_merge_too_long) ;
594
+ check_last (
595
+ "foo::bar" ,
596
+ r"use foo::bar::baz::Qux;" ,
597
+ r"use foo::bar::baz::Qux;
598
+ use foo::bar;" ,
599
+ ) ;
600
+ }
601
+
589
602
fn check (
590
603
path : & str ,
591
604
ra_fixture_before : & str ,
You can’t perform that action at this time.
0 commit comments