diff options
| author | kennytm <kennytm@gmail.com> | 2018-03-06 18:21:35 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-03-06 20:52:37 +0800 |
| commit | 8e3493d45924fdb869c37dcb992759f71defed7c (patch) | |
| tree | d3b1572516c7a81c2a2174d5716bab06388a1d16 /src/libstd_unicode | |
| parent | ebc6d6e24fa28cfaebd788786f61ab01a9ffda54 (diff) | |
| parent | c7c23fe9482c129855a667909ff58969f6efe1f6 (diff) | |
| download | rust-8e3493d45924fdb869c37dcb992759f71defed7c.tar.gz rust-8e3493d45924fdb869c37dcb992759f71defed7c.zip | |
Rollup merge of #47463 - bluss:fused-iterator, r=alexcrichton
Stabilize FusedIterator FusedIterator is a marker trait that promises that the implementing iterator continues to return `None` from `.next()` once it has returned `None` once (and/or `.next_back()`, if implemented). The effects of FusedIterator are already widely available through `.fuse()`, but with stable `FusedIterator`, stable Rust users can implement this trait for their iterators when appropriate. Closes #35602
Diffstat (limited to 'src/libstd_unicode')
| -rw-r--r-- | src/libstd_unicode/char.rs | 4 | ||||
| -rw-r--r-- | src/libstd_unicode/lib.rs | 1 | ||||
| -rw-r--r-- | src/libstd_unicode/u_str.rs | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/libstd_unicode/char.rs b/src/libstd_unicode/char.rs index 5dd9c627750..de8b46d5f1b 100644 --- a/src/libstd_unicode/char.rs +++ b/src/libstd_unicode/char.rs @@ -70,7 +70,7 @@ impl Iterator for ToLowercase { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.26.0")] impl FusedIterator for ToLowercase {} /// Returns an iterator that yields the uppercase equivalent of a `char`. @@ -92,7 +92,7 @@ impl Iterator for ToUppercase { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.26.0")] impl FusedIterator for ToUppercase {} #[derive(Debug, Clone)] diff --git a/src/libstd_unicode/lib.rs b/src/libstd_unicode/lib.rs index dcae7d0af40..f155b62e3cc 100644 --- a/src/libstd_unicode/lib.rs +++ b/src/libstd_unicode/lib.rs @@ -36,7 +36,6 @@ #![feature(str_internals)] #![feature(decode_utf8)] #![feature(fn_traits)] -#![feature(fused)] #![feature(lang_items)] #![feature(non_exhaustive)] #![feature(staged_api)] diff --git a/src/libstd_unicode/u_str.rs b/src/libstd_unicode/u_str.rs index 5d1611acb7e..a72e1210d93 100644 --- a/src/libstd_unicode/u_str.rs +++ b/src/libstd_unicode/u_str.rs @@ -127,7 +127,6 @@ impl<I> Iterator for Utf16Encoder<I> } } -#[unstable(feature = "fused", issue = "35602")] impl<I> FusedIterator for Utf16Encoder<I> where I: FusedIterator<Item = char> {} @@ -186,5 +185,5 @@ impl<'a> DoubleEndedIterator for SplitWhitespace<'a> { } } -#[unstable(feature = "fused", issue = "35602")] +#[stable(feature = "fused", since = "1.26.0")] impl<'a> FusedIterator for SplitWhitespace<'a> {} |
