From 76ddface089886c88b8b29e3893119f38ef26aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Tue, 23 Jun 2020 09:41:43 +0300 Subject: Fix panic in split and merge import assists --- crates/ra_assists/src/handlers/split_import.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/ra_assists/src/handlers/split_import.rs') diff --git a/crates/ra_assists/src/handlers/split_import.rs b/crates/ra_assists/src/handlers/split_import.rs index c7a874480..38aa199a0 100644 --- a/crates/ra_assists/src/handlers/split_import.rs +++ b/crates/ra_assists/src/handlers/split_import.rs @@ -66,4 +66,14 @@ mod tests { fn issue4044() { check_assist_not_applicable(split_import, "use crate::<|>:::self;") } + + #[test] + fn test_empty_use() { + check_assist_not_applicable( + split_import, + r" +use std::<|> +fn main() {}", + ); + } } -- cgit v1.2.3