diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-21 15:28:06 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-21 15:28:06 -0700 |
| commit | 98e9765d973d46faa5c80fb37a48040ca9e87b28 (patch) | |
| tree | 13f27a4765ca1feeaeb48a829f9f0e810305fc5e /src/test | |
| parent | 44338cb944f8a4ac8132929d7546a12291392aab (diff) | |
| parent | 8f5b5f94dcdb9884737dfbc8efd893d1d70f0b14 (diff) | |
| download | rust-98e9765d973d46faa5c80fb37a48040ca9e87b28.tar.gz rust-98e9765d973d46faa5c80fb37a48040ca9e87b28.zip | |
rollup merge of #24541: alexcrichton/issue-24538
This is an implementation of [RFC 1030][rfc] which adds these traits to the prelude and additionally removes all inherent `into_iter` methods on collections in favor of the trait implementation (which is now accessible by default). [rfc]: https://github.com/rust-lang/rfcs/pull/1030 This is technically a breaking change due to the prelude additions and removal of inherent methods, but it is expected that essentially no code breaks in practice. [breaking-change] Closes #24538
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/issue-21245.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/run-pass/issue-21245.rs b/src/test/run-pass/issue-21245.rs index 75d064a00fa..e3340d9767d 100644 --- a/src/test/run-pass/issue-21245.rs +++ b/src/test/run-pass/issue-21245.rs @@ -20,19 +20,19 @@ use std::ptr; trait IntoIterator { type Iter: Iterator; - fn into_iter(self) -> Self::Iter; + fn into_iter2(self) -> Self::Iter; } impl<I> IntoIterator for I where I: Iterator { type Iter = I; - fn into_iter(self) -> I { + fn into_iter2(self) -> I { self } } fn desugared_for_loop_bad<T>(v: Vec<T>) { - match IntoIterator::into_iter(v.iter()) { + match IntoIterator::into_iter2(v.iter()) { mut iter => { loop { match ::std::iter::Iterator::next(&mut iter) { |
