File tree 2 files changed +2
-4
lines changed
compiler/rustc_resolve/src
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1708,10 +1708,7 @@ crate fn show_candidates(
1708
1708
1709
1709
path_strings. sort ( ) ;
1710
1710
let core_path_strings =
1711
- path_strings. iter ( ) . filter ( |p| p. starts_with ( "core::" ) ) . cloned ( ) . collect :: < Vec < String > > ( ) ;
1712
- if !core_path_strings. is_empty ( ) {
1713
- path_strings. retain ( |p| !p. starts_with ( "core::" ) ) ;
1714
- }
1711
+ path_strings. drain_filter ( |p| p. starts_with ( "core::" ) ) . collect :: < Vec < String > > ( ) ;
1715
1712
path_strings. extend ( core_path_strings) ;
1716
1713
path_strings. dedup ( ) ;
1717
1714
Original file line number Diff line number Diff line change 10
10
11
11
#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
12
12
#![ feature( box_patterns) ]
13
+ #![ feature( drain_filter) ]
13
14
#![ feature( bool_to_option) ]
14
15
#![ feature( crate_visibility_modifier) ]
15
16
#![ feature( format_args_capture) ]
You can’t perform that action at this time.
0 commit comments