File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
crates/ide_completion/src Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -368,9 +368,9 @@ fn main() {
368
368
}
369
369
"# ,
370
370
expect ! [ [ r#"
371
- st dep::some_module::ThirdStruct
372
- st dep::some_module::AfterThirdStruct
373
- st dep::some_module::ThiiiiiirdStruct
371
+ st ThirdStruct (use dep::some_module::ThirdStruct)
372
+ st AfterThirdStruct (use dep::some_module::AfterThirdStruct)
373
+ st ThiiiiiirdStruct (use dep::some_module::ThiiiiiirdStruct)
374
374
"# ] ] ,
375
375
) ;
376
376
}
@@ -817,7 +817,7 @@ fn main() {
817
817
check (
818
818
fixture,
819
819
expect ! [ [ r#"
820
- st foo::bar::baz::Item
820
+ st Item (use foo::bar::baz::Item)
821
821
"# ] ] ,
822
822
) ;
823
823
@@ -997,7 +997,7 @@ fn main() {
997
997
TE$0
998
998
}"# ,
999
999
expect ! [ [ r#"
1000
- ct foo::TEST_CONST
1000
+ ct TEST_CONST (use foo::TEST_CONST)
1001
1001
"# ] ] ,
1002
1002
) ;
1003
1003
@@ -1014,7 +1014,7 @@ fn main() {
1014
1014
te$0
1015
1015
}"# ,
1016
1016
expect ! [ [ r#"
1017
- ct foo::TEST_CONST
1017
+ ct TEST_CONST (use foo::TEST_CONST)
1018
1018
fn test_function() (use foo::test_function) fn() -> i32
1019
1019
"# ] ] ,
1020
1020
) ;
Original file line number Diff line number Diff line change @@ -429,13 +429,7 @@ impl Builder {
429
429
{
430
430
lookup = lookup. or_else ( || Some ( label. clone ( ) ) ) ;
431
431
insert_text = insert_text. or_else ( || Some ( label. clone ( ) ) ) ;
432
-
433
- let original_path_label = original_path. to_string ( ) ;
434
- if original_path_label. ends_with ( & label) {
435
- label = original_path_label;
436
- } else {
437
- format_to ! ( label, " (use {})" , original_path)
438
- }
432
+ format_to ! ( label, " (use {})" , original_path)
439
433
} else if let Some ( trait_name) = self . trait_name {
440
434
insert_text = insert_text. or_else ( || Some ( label. clone ( ) ) ) ;
441
435
format_to ! ( label, " (as {})" , trait_name)
You can’t perform that action at this time.
0 commit comments