remove drain-on-drop behavior from vec::DrainFilter and add #[must_use]
This commit is contained in:
parent
fa8762b7b6
commit
c0df1c8c43
6 changed files with 32 additions and 131 deletions
|
@ -1170,11 +1170,11 @@ fn opt_normalize_projection_type<'a, 'b, 'tcx>(
|
|||
};
|
||||
|
||||
let mut deduped: SsoHashSet<_> = Default::default();
|
||||
result.obligations.drain_filter(|projected_obligation| {
|
||||
result.obligations.retain(|projected_obligation| {
|
||||
if !deduped.insert(projected_obligation.clone()) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
false
|
||||
true
|
||||
});
|
||||
|
||||
if use_cache {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue