File tree Expand file tree Collapse file tree 1 file changed +73
-0
lines changed
crates/ide-assists/src/handlers Expand file tree Collapse file tree 1 file changed +73
-0
lines changed Original file line number Diff line number Diff line change @@ -536,6 +536,79 @@ mod y {
536
536
) ;
537
537
}
538
538
539
+ #[ test]
540
+ fn remove_unused_auto_remove_brace_nested ( ) {
541
+ check_assist (
542
+ remove_unused_imports,
543
+ r#"
544
+ mod a {
545
+ pub struct A();
546
+ }
547
+ mod b {
548
+ struct F();
549
+ mod c {
550
+ $0use {{super::{{
551
+ {d::{{{{{{{S, U}}}}}}}},
552
+ {{{{e::{H, L, {{{R}}}}}}}},
553
+ F, super::a::A
554
+ }}}};$0
555
+ fn f() {
556
+ let f = F();
557
+ let l = L();
558
+ let a = A();
559
+ let s = S();
560
+ let h = H();
561
+ }
562
+ }
563
+
564
+ mod d {
565
+ pub struct S();
566
+ pub struct U();
567
+ }
568
+
569
+ mod e {
570
+ pub struct H();
571
+ pub struct L();
572
+ pub struct R();
573
+ }
574
+ }
575
+ "# ,
576
+ r#"
577
+ mod a {
578
+ pub struct A();
579
+ }
580
+ mod b {
581
+ struct F();
582
+ mod c {
583
+ use super::{
584
+ d::S,
585
+ e::{H, L},
586
+ F, super::a::A
587
+ };
588
+ fn f() {
589
+ let f = F();
590
+ let l = L();
591
+ let a = A();
592
+ let s = S();
593
+ let h = H();
594
+ }
595
+ }
596
+
597
+ mod d {
598
+ pub struct S();
599
+ pub struct U();
600
+ }
601
+
602
+ mod e {
603
+ pub struct H();
604
+ pub struct L();
605
+ pub struct R();
606
+ }
607
+ }
608
+ "# ,
609
+ ) ;
610
+ }
611
+
539
612
#[ test]
540
613
fn remove_nested_all_unused ( ) {
541
614
check_assist (
You can’t perform that action at this time.
0 commit comments