diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-07-04 07:41:42 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-04 07:41:42 -0600 |
| commit | 5f732eba7a2872155fd8791cccfa2bf19078b89c (patch) | |
| tree | 36bd3e9c34a3271ca3f0d618a241231fdb421481 /src/test/incremental/thinlto | |
| parent | 2fdb9c978da81d60671feb16dd348e8e551288e1 (diff) | |
| parent | d68c3ab17b6f6c3b71d0531063aec8e64098f59c (diff) | |
| download | rust-5f732eba7a2872155fd8791cccfa2bf19078b89c.tar.gz rust-5f732eba7a2872155fd8791cccfa2bf19078b89c.zip | |
Rollup merge of #43041 - andersk:dedup_by, r=alexcrichton
Document unintuitive argument order for Vec::dedup_by relation When trying to use `dedup_by` to merge some auxiliary information from removed elements into kept elements, I was surprised to observe that `vec.dedup_by(same_bucket)` calls `same_bucket(a, b)` where `b` appears before `a` in the vector, and discards `a` when true is returned. This argument order is probably a bug, but since it has already been stabilized, I guess we should document it as a feature and move on. (`Vec::dedup` also uses `==` with this unexpected argument order, but I figure that’s not important since `==` is expected to be symmetric with no side effects.)
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
