diff options
| author | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-02-18 11:37:14 +0900 |
|---|---|---|
| committer | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-02-22 16:57:39 +0900 |
| commit | 93e6b0d643099beb95d16da91a833781ac6b8e95 (patch) | |
| tree | f435a89ff73db256b368b54e2833144602327ed3 | |
| parent | 0e26bb728784c8e98c8e67eb2c60e88733167d03 (diff) | |
| download | rust-93e6b0d643099beb95d16da91a833781ac6b8e95.tar.gz rust-93e6b0d643099beb95d16da91a833781ac6b8e95.zip | |
Remove needless dedup from projection
| -rw-r--r-- | src/librustc/traits/project.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/librustc/traits/project.rs b/src/librustc/traits/project.rs index 7ae96911941..540f18343f5 100644 --- a/src/librustc/traits/project.rs +++ b/src/librustc/traits/project.rs @@ -835,16 +835,6 @@ fn project_type<'cx, 'gcx, 'tcx>( return Err(ProjectionTyError::TooManyCandidates); } - // Drop duplicates. - // - // Note: `candidates.vec` seems to be on the critical path of the - // compiler. Replacing it with an HashSet was also tried, which would - // render the following dedup unnecessary. The original comment indicated - // that it was 9% slower, but that data is now obsolete and a new - // benchmark should be performed. - candidates.vec.sort_unstable(); - candidates.vec.dedup(); - // Prefer where-clauses. As in select, if there are multiple // candidates, we prefer where-clause candidates over impls. This // may seem a bit surprising, since impls are the source of |
