about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/string-from_ut.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-05-28 00:18:52 +0000
committerbors <bors@rust-lang.org>2020-05-28 00:18:52 +0000
commit45127211566c53bac386b66909a830649182ab7a (patch)
tree821762c0357a83853b5a76f7ce6e47e578790a12 /src/test/rustdoc-js-std/string-from_ut.js
parent664fcd3f046e2a6824602da0fad81e3e2bb0d409 (diff)
parentf15e4b30c0d217b647e443333902ca7a948e0f58 (diff)
downloadrust-45127211566c53bac386b66909a830649182ab7a.tar.gz
rust-45127211566c53bac386b66909a830649182ab7a.zip
Auto merge of #72494 - lcnr:predicate-cleanup, r=nikomatsakis
Pass more `Copy` types by value.

There are a lot of locations where we pass `&T where T: Copy` by reference,
which should both be slightly less performant and less readable IMO.

This PR currently consists of three fairly self contained commits:

- passes `ty::Predicate` by value and stops depending on `AsRef<ty::Predicate>`.
- changes `<&List<_>>::into_iter` to iterate over the elements by value. This would break `List`s
  of non copy types. But as the only list constructor requires `T` to be copy anyways, I think
  the improved readability is worth this potential future restriction.
- passes `mir::PlaceElem` by value. Mir currently has quite a few copy types which are passed by reference, e.g. `Local`. As I don't have a lot of experience working with MIR, I mostly did this to get some feedback from people who use MIR more frequently
- tries to reuse `ty::Predicate` in case it did not change in some places, which should hopefully
  fix the regression caused by #72055

r? @nikomatsakis for the first commit, which continues the work of #72055 and makes adding `PredicateKind::ForAll` slightly more pleasant. Feel free to reassign though
Diffstat (limited to 'src/test/rustdoc-js-std/string-from_ut.js')
0 files changed, 0 insertions, 0 deletions