about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorAnders Kaseorg <andersk@mit.edu>2017-07-03 17:18:01 -0400
committerAnders Kaseorg <andersk@mit.edu>2017-07-03 18:38:53 -0400
commitd68c3ab17b6f6c3b71d0531063aec8e64098f59c (patch)
treea0982968fd07326593d8a54b5e38d59c309fb3a2 /src/test/incremental/thinlto
parent734c83642cff23f0d9b4b8f006b05437697bcd91 (diff)
downloadrust-d68c3ab17b6f6c3b71d0531063aec8e64098f59c.tar.gz
rust-d68c3ab17b6f6c3b71d0531063aec8e64098f59c.zip
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.)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions