Skip to content

Commit 04fbfae

Browse files
Update to rustc 0.13.0-nightly (c6c786671 2015-01-04 00:50:59 +0000)
1 parent d7c5c0e commit 04fbfae

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

regex_macros/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
1919
html_root_url = "http://doc.rust-lang.org/nightly/")]
2020

21-
#![feature(plugin_registrar, quote)]
21+
#![feature(associated_types, plugin_registrar, quote)]
2222

2323
extern crate regex;
2424
extern crate syntax;
@@ -601,7 +601,7 @@ fn exec<'t>(which: ::regex::native::MatchKind, input: &'t str,
601601

602602
// Converts `xs` to a `[x1, x2, .., xN]` expression by calling `to_expr`
603603
// on each element in `xs`.
604-
fn vec_expr<T, It: Iterator<T>>(&self, xs: It,
604+
fn vec_expr<T, It: Iterator<Item=T>>(&self, xs: It,
605605
to_expr: |&ExtCtxt, T| -> P<ast::Expr>)
606606
-> P<ast::Expr> {
607607
let exprs = xs.map(|x| to_expr(self.cx, x)).collect();

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
//! characters in the search text and `m` is the number of instructions in a
362362
//! compiled expression.
363363
364-
#![feature(macro_rules, slicing_syntax, globs)]
364+
#![feature(associated_types, macro_rules, slicing_syntax, globs)]
365365
#![deny(missing_docs)]
366366
#![cfg_attr(test, deny(warnings))]
367367
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

src/re.rs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,9 @@ pub enum NamesIter<'a> {
547547
NamesIterDynamic(::std::slice::Iter<'a, Option<String>>)
548548
}
549549

550-
impl<'a> Iterator<Option<String>> for NamesIter<'a> {
550+
impl<'a> Iterator for NamesIter<'a> {
551+
type Item=Option<String>;
552+
551553
fn next(&mut self) -> Option<Option<String>> {
552554
match *self {
553555
NamesIterNative(ref mut i) => i.next().map(|x| x.map(|s| s.to_string())),
@@ -603,7 +605,9 @@ pub struct RegexSplits<'r, 't> {
603605
last: uint,
604606
}
605607

606-
impl<'r, 't> Iterator<&'t str> for RegexSplits<'r, 't> {
608+
impl<'r, 't> Iterator for RegexSplits<'r, 't> {
609+
type Item = &'t str;
610+
607611
fn next(&mut self) -> Option<&'t str> {
608612
let text = self.finder.search;
609613
match self.finder.next() {
@@ -637,7 +641,9 @@ pub struct RegexSplitsN<'r, 't> {
637641
limit: uint,
638642
}
639643

640-
impl<'r, 't> Iterator<&'t str> for RegexSplitsN<'r, 't> {
644+
impl<'r, 't> Iterator for RegexSplitsN<'r, 't> {
645+
type Item = &'t str;
646+
641647
fn next(&mut self) -> Option<&'t str> {
642648
let text = self.splits.finder.search;
643649
if self.cur >= self.limit {
@@ -799,7 +805,9 @@ pub struct SubCaptures<'t> {
799805
caps: &'t Captures<'t>,
800806
}
801807

802-
impl<'t> Iterator<&'t str> for SubCaptures<'t> {
808+
impl<'t> Iterator for SubCaptures<'t> {
809+
type Item = &'t str;
810+
803811
fn next(&mut self) -> Option<&'t str> {
804812
if self.idx < self.caps.len() {
805813
self.idx += 1;
@@ -821,7 +829,9 @@ pub struct SubCapturesPos<'t> {
821829
caps: &'t Captures<'t>,
822830
}
823831

824-
impl<'t> Iterator<Option<(uint, uint)>> for SubCapturesPos<'t> {
832+
impl<'t> Iterator for SubCapturesPos<'t> {
833+
type Item = Option<(uint, uint)>;
834+
825835
fn next(&mut self) -> Option<Option<(uint, uint)>> {
826836
if self.idx < self.caps.len() {
827837
self.idx += 1;
@@ -846,7 +856,9 @@ pub struct FindCaptures<'r, 't> {
846856
last_end: uint,
847857
}
848858

849-
impl<'r, 't> Iterator<Captures<'t>> for FindCaptures<'r, 't> {
859+
impl<'r, 't> Iterator for FindCaptures<'r, 't> {
860+
type Item = Captures<'t>;
861+
850862
fn next(&mut self) -> Option<Captures<'t>> {
851863
if self.last_end > self.search.len() {
852864
return None
@@ -888,7 +900,9 @@ pub struct FindMatches<'r, 't> {
888900
last_end: uint,
889901
}
890902

891-
impl<'r, 't> Iterator<(uint, uint)> for FindMatches<'r, 't> {
903+
impl<'r, 't> Iterator for FindMatches<'r, 't> {
904+
type Item = (uint, uint);
905+
892906
fn next(&mut self) -> Option<(uint, uint)> {
893907
if self.last_end > self.search.len() {
894908
return None

0 commit comments

Comments
 (0)