File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
compiler/rustc_resolve/src Expand file tree Collapse file tree 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(
17081708
17091709 path_strings. sort ( ) ;
17101710 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 > > ( ) ;
17151712 path_strings. extend ( core_path_strings) ;
17161713 path_strings. dedup ( ) ;
17171714
Original file line number Diff line number Diff line change 1010
1111#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
1212#![ feature( box_patterns) ]
13+ #![ feature( drain_filter) ]
1314#![ feature( bool_to_option) ]
1415#![ feature( crate_visibility_modifier) ]
1516#![ feature( format_args_capture) ]
You can’t perform that action at this time.
0 commit comments