};
use crate::assist_context::AssistContext;
+use test_utils::mark;
/// Determines the containing syntax node in which to insert a `use` statement affecting `position`.
pub(crate) fn find_insert_use_container(
if merge_behaviour == MergeBehaviour::Last
&& (use_tree_list_is_nested(&lhs_tl) || use_tree_list_is_nested(&rhs_tl))
{
+ mark::hit!(test_last_merge_too_long);
return None;
}
)
}
+ #[test]
+ fn merge_last_too_long() {
+ mark::check!(test_last_merge_too_long);
+ check_last(
+ "foo::bar",
+ r"use foo::bar::baz::Qux;",
+ r"use foo::bar::baz::Qux;
+use foo::bar;",
+ );
+ }
+
fn check(
path: &str,
ra_fixture_before: &str,