diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:49:15 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:49:15 -0800 |
| commit | 26cd8eae48ea99bda183c5224bc423991ccfaf1f (patch) | |
| tree | 26492380aa79b1b1f70acb2a624e30ca097374df /src/libcore/str | |
| parent | 34a63d336419e80d3afec16c730d1ad5fa11dc73 (diff) | |
| parent | e9cbdd866d1c9c01e9affaf6875e37e58a073758 (diff) | |
| download | rust-26cd8eae48ea99bda183c5224bc423991ccfaf1f.tar.gz rust-26cd8eae48ea99bda183c5224bc423991ccfaf1f.zip | |
rollup merge of #20563: cmr/macro-input-future-proofing
Diffstat (limited to 'src/libcore/str')
| -rw-r--r-- | src/libcore/str/mod.rs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index d633f822ff7..3f8ce000e21 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -35,9 +35,8 @@ use slice::{self, SliceExt}; use uint; macro_rules! delegate_iter { - (exact $te:ty in $ti:ty) => { - delegate_iter!{$te in $ti} - #[stable] + (exact $te:ty : $ti:ty) => { + delegate_iter!{$te : $ti} impl<'a> ExactSizeIterator for $ti { #[inline] fn len(&self) -> uint { @@ -45,7 +44,7 @@ macro_rules! delegate_iter { } } }; - ($te:ty in $ti:ty) => { + ($te:ty : $ti:ty) => { #[stable] impl<'a> Iterator for $ti { type Item = $te; @@ -67,7 +66,7 @@ macro_rules! delegate_iter { } } }; - (pattern $te:ty in $ti:ty) => { + (pattern $te:ty : $ti:ty) => { #[stable] impl<'a, P: CharEq> Iterator for $ti { type Item = $te; @@ -89,7 +88,7 @@ macro_rules! delegate_iter { } } }; - (pattern forward $te:ty in $ti:ty) => { + (pattern forward $te:ty : $ti:ty) => { #[stable] impl<'a, P: CharEq> Iterator for $ti { type Item = $te; @@ -415,7 +414,7 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> { #[stable] #[derive(Clone)] pub struct Bytes<'a>(Map<&'a u8, u8, slice::Iter<'a, u8>, BytesDeref>); -delegate_iter!{exact u8 in Bytes<'a>} +delegate_iter!{exact u8 : Bytes<'a>} /// A temporary fn new type that ensures that the `Bytes` iterator /// is cloneable. @@ -1172,25 +1171,25 @@ impl<'a, S: ?Sized> Str for &'a S where S: Str { #[derive(Clone)] #[stable] pub struct Split<'a, P>(CharSplits<'a, P>); -delegate_iter!{pattern &'a str in Split<'a, P>} +delegate_iter!{pattern &'a str : Split<'a, P>} /// Return type of `StrExt::split_terminator` #[derive(Clone)] #[unstable = "might get removed in favour of a constructor method on Split"] pub struct SplitTerminator<'a, P>(CharSplits<'a, P>); -delegate_iter!{pattern &'a str in SplitTerminator<'a, P>} +delegate_iter!{pattern &'a str : SplitTerminator<'a, P>} /// Return type of `StrExt::splitn` #[derive(Clone)] #[stable] pub struct SplitN<'a, P>(CharSplitsN<'a, P>); -delegate_iter!{pattern forward &'a str in SplitN<'a, P>} +delegate_iter!{pattern forward &'a str : SplitN<'a, P>} /// Return type of `StrExt::rsplitn` #[derive(Clone)] #[stable] pub struct RSplitN<'a, P>(CharSplitsN<'a, P>); -delegate_iter!{pattern forward &'a str in RSplitN<'a, P>} +delegate_iter!{pattern forward &'a str : RSplitN<'a, P>} /// Methods for string slices #[allow(missing_docs)] |
