mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
rustc_resolve: don't open-code Option::filter
This commit is contained in:
parent
6f22dfe4df
commit
efabee2dee
@ -1976,10 +1976,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
|||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
candidates.sort();
|
candidates.sort();
|
||||||
candidates.dedup();
|
candidates.dedup();
|
||||||
match find_best_match_for_name(&candidates, ident, None) {
|
find_best_match_for_name(&candidates, ident, None).filter(|sugg| *sugg != ident)
|
||||||
Some(sugg) if sugg == ident => None,
|
|
||||||
sugg => sugg,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn report_path_resolution_error(
|
pub(crate) fn report_path_resolution_error(
|
||||||
|
Loading…
Reference in New Issue
Block a user