From 700034bd5a46dd6e3b5aa6322522e42c2a665fe9 Mon Sep 17 00:00:00 2001 From: Jesse Bakker Date: Fri, 18 Dec 2020 14:30:56 +0100 Subject: Do not merge imports with different attributes --- crates/ide_db/src/helpers/insert_use/tests.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crates/ide_db/src/helpers/insert_use') diff --git a/crates/ide_db/src/helpers/insert_use/tests.rs b/crates/ide_db/src/helpers/insert_use/tests.rs index 9e194354e..a603fe87f 100644 --- a/crates/ide_db/src/helpers/insert_use/tests.rs +++ b/crates/ide_db/src/helpers/insert_use/tests.rs @@ -447,6 +447,20 @@ use std::io;", ) } +#[test] +fn merge_groups_skip_attributed() { + check_full( + "std::io", + r#" +#[cfg(feature = "gated")] use std::fmt::{Result, Display}; +"#, + r#" +#[cfg(feature = "gated")] use std::fmt::{Result, Display}; +use std::io; +"#, + ) +} + #[test] #[ignore] // FIXME: Support this fn split_out_merge() { -- cgit v1.2.3