Skip to content

Commit 93e6b0d

Browse files
committed
Remove needless dedup from projection
1 parent 0e26bb7 commit 93e6b0d

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/librustc/traits/project.rs

-10
Original file line numberDiff line numberDiff line change
@@ -835,16 +835,6 @@ fn project_type<'cx, 'gcx, 'tcx>(
835835
return Err(ProjectionTyError::TooManyCandidates);
836836
}
837837

838-
// Drop duplicates.
839-
//
840-
// Note: `candidates.vec` seems to be on the critical path of the
841-
// compiler. Replacing it with an HashSet was also tried, which would
842-
// render the following dedup unnecessary. The original comment indicated
843-
// that it was 9% slower, but that data is now obsolete and a new
844-
// benchmark should be performed.
845-
candidates.vec.sort_unstable();
846-
candidates.vec.dedup();
847-
848838
// Prefer where-clauses. As in select, if there are multiple
849839
// candidates, we prefer where-clause candidates over impls. This
850840
// may seem a bit surprising, since impls are the source of

0 commit comments

Comments
 (0)