convert remaining range(a, b) to a..b

This commit is contained in:
Jorge Aparicio 2015-01-26 16:05:07 -05:00
parent 7d661af9c8
commit efc97a51ff
48 changed files with 101 additions and 102 deletions

View file

@ -770,7 +770,7 @@ impl<'a> MethodDef<'a> {
let mut raw_fields = Vec::new(); // ~[[fields of self],
// [fields of next Self arg], [etc]]
let mut patterns = Vec::new();
for i in range(0us, self_args.len()) {
for i in 0us..self_args.len() {
let struct_path= cx.path(DUMMY_SP, vec!( type_ident ));
let (pat, ident_expr) =
trait_.create_struct_pattern(cx,

View file

@ -661,7 +661,7 @@ pub fn expand_preparsed_format_args(ecx: &mut ExtCtxt, sp: Span,
name_ordering: Vec<String>,
names: HashMap<String, P<ast::Expr>>)
-> P<ast::Expr> {
let arg_types: Vec<_> = range(0, args.len()).map(|_| None).collect();
let arg_types: Vec<_> = (0..args.len()).map(|_| None).collect();
let mut cx = Context {
ecx: ecx,
args: args,

View file

@ -665,7 +665,7 @@ fn mk_tt(cx: &ExtCtxt, tt: &ast::TokenTree) -> Vec<P<ast::Stmt>> {
}
ref tt @ ast::TtToken(_, MatchNt(..)) => {
let mut seq = vec![];
for i in range(0, tt.len()) {
for i in 0..tt.len() {
seq.push(tt.get_tt(i));
}
mk_tts(cx, &seq[])

View file

@ -392,7 +392,7 @@ pub fn parse(sess: &ParseSess,
cur_eis.push(new_ei);
}
let matches: Vec<_> = range(0, ei.matches.len())
let matches: Vec<_> = (0..ei.matches.len())
.map(|_| Vec::new()).collect();
let ei_t = ei;
cur_eis.push(box MatcherPos {