diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-07-14 20:57:13 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-14 20:57:13 -0700 |
| commit | e7a9f1b626455d51c2804692f2e7c1ea4f22d78e (patch) | |
| tree | 078ee9de64a96fe568238da8a11ed7f6ea39bf14 /src/rustllvm/PassWrapper.cpp | |
| parent | 23ecebd6bd4362142ac586014aec44070a177a3d (diff) | |
| parent | 2007987099309e05c08d65e6a0e722c5ec1d0653 (diff) | |
| download | rust-e7a9f1b626455d51c2804692f2e7c1ea4f22d78e.tar.gz rust-e7a9f1b626455d51c2804692f2e7c1ea4f22d78e.zip | |
Rollup merge of #43074 - SimonSapin:iter, r=aturon
Forward more Iterator methods This allows in more cases to take advantage of specific (possibly more optimized) impls of these methods, rather than the default one defined for all `Iterator`s. I also wanted to do this for `&mut I` and `Box<I>`, but that didn’t compile for two reasons: * To make the trait object-safe, generic methods (e.g. that take a closure parameter) have a `where Self: Sized` bound. But e.g. `Box<I>: Sized` does not imply `I: Sized`, and adding an additional bound in the impl is not allowed. Some for of specialization would be needed here. * With e.g. a `F: FnMut(Self::Item) -> bool` bound and a `type Item = I::Item` associated types, I got errors like `F does not implement FnMut(I::Item) -> bool`. This looks like a limitation in the trait resolution system not recognizing that `Self::Item == I::Item` or "propagating" that fact to `FnMut` bounds.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
