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::{
1010} ;
1111
1212use crate :: assist_context:: AssistContext ;
13+ use test_utils:: mark;
1314
1415/// Determines the containing syntax node in which to insert a `use` statement affecting `position`.
1516pub ( crate ) fn find_insert_use_container (
@@ -126,6 +127,7 @@ pub fn try_merge_trees(
126127 if merge_behaviour == MergeBehaviour :: Last
127128 && ( use_tree_list_is_nested ( & lhs_tl) || use_tree_list_is_nested ( & rhs_tl) )
128129 {
130+ mark:: hit!( test_last_merge_too_long) ;
129131 return None ;
130132 }
131133
@@ -586,6 +588,17 @@ use std::io;",
586588 )
587589 }
588590
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+
589602 fn check (
590603 path : & str ,
591604 ra_fixture_before : & str ,
You can’t perform that action at this time.
0 commit comments