diff options
Diffstat (limited to 'src/libregex/re.rs')
| -rw-r--r-- | src/libregex/re.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libregex/re.rs b/src/libregex/re.rs index 69c58eebd56..8edbf263d74 100644 --- a/src/libregex/re.rs +++ b/src/libregex/re.rs @@ -104,7 +104,7 @@ pub fn is_match(regex: &str, text: &str) -> Result<bool, parse::Error> { /// makes it much faster when searching text. /// More details about the `regex!` macro can be found in the `regex` crate /// documentation. -#[deriving(Clone)] +#[derive(Clone)] pub enum Regex { // The representation of `Regex` is exported to support the `regex!` // syntax extension. Do not rely on it. @@ -117,7 +117,7 @@ pub enum Regex { Native(ExNative), } -#[deriving(Clone)] +#[derive(Clone)] #[doc(hidden)] pub struct ExDynamic { original: String, @@ -127,7 +127,7 @@ pub struct ExDynamic { } #[doc(hidden)] -#[deriving(Copy)] +#[derive(Copy)] pub struct ExNative { #[doc(hidden)] pub original: &'static str, @@ -540,7 +540,7 @@ impl Regex { } -#[deriving(Clone)] +#[derive(Clone)] pub enum NamesIter<'a> { NamesIterNative(::std::slice::Iter<'a, Option<&'static str>>), NamesIterDynamic(::std::slice::Iter<'a, Option<String>>) @@ -599,7 +599,7 @@ impl<F> Replacer for F where F: FnMut(&Captures) -> String { /// /// `'r` is the lifetime of the compiled expression and `'t` is the lifetime /// of the string being split. -#[deriving(Clone)] +#[derive(Clone)] pub struct RegexSplits<'r, 't> { finder: FindMatches<'r, 't>, last: uint, @@ -635,7 +635,7 @@ impl<'r, 't> Iterator for RegexSplits<'r, 't> { /// /// `'r` is the lifetime of the compiled expression and `'t` is the lifetime /// of the string being split. -#[deriving(Clone)] +#[derive(Clone)] pub struct RegexSplitsN<'r, 't> { splits: RegexSplits<'r, 't>, cur: uint, @@ -801,7 +801,7 @@ impl<'t> Captures<'t> { /// expression. /// /// `'t` is the lifetime of the matched text. -#[deriving(Clone)] +#[derive(Clone)] pub struct SubCaptures<'t> { idx: uint, caps: &'t Captures<'t>, @@ -826,7 +826,7 @@ impl<'t> Iterator for SubCaptures<'t> { /// Positions are byte indices in terms of the original string matched. /// /// `'t` is the lifetime of the matched text. -#[deriving(Clone)] +#[derive(Clone)] pub struct SubCapturesPos<'t> { idx: uint, caps: &'t Captures<'t>, @@ -852,7 +852,7 @@ impl<'t> Iterator for SubCapturesPos<'t> { /// /// `'r` is the lifetime of the compiled expression and `'t` is the lifetime /// of the matched string. -#[deriving(Clone)] +#[derive(Clone)] pub struct FindCaptures<'r, 't> { re: &'r Regex, search: &'t str, @@ -897,7 +897,7 @@ impl<'r, 't> Iterator for FindCaptures<'r, 't> { /// /// `'r` is the lifetime of the compiled expression and `'t` is the lifetime /// of the matched string. -#[deriving(Clone)] +#[derive(Clone)] pub struct FindMatches<'r, 't> { re: &'r Regex, search: &'t str, |
