Skip to content

Commit e2a752e

Browse files
committed
---
yaml --- r: 4708 b: refs/heads/master c: f91351a h: refs/heads/master v: v3
1 parent 5075b5c commit e2a752e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+566
-566
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: cb239cc028d388ce9784ffc023639924c5a2e59b
2+
refs/heads/master: f91351aaf69b0d4fefaff0df1c288466c0183de5

trunk/src/comp/back/link.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ fn build_link_meta(sess: &session::session, c: &ast::crate, output: &str,
296296
let cmh_items: [@ast::meta_item] = ~[];
297297
let linkage_metas = attr::find_linkage_metas(c.node.attrs);
298298
attr::require_unique_names(sess, linkage_metas);
299-
for meta: @ast::meta_item in linkage_metas {
299+
for meta: @ast::meta_item in linkage_metas {
300300
if attr::get_meta_item_name(meta) == "name" {
301301
alt attr::get_meta_item_value_str(meta) {
302302
some(v) { name = some(v); }
@@ -326,7 +326,7 @@ fn build_link_meta(sess: &session::session, c: &ast::crate, output: &str,
326326
let cmh_items = attr::sort_meta_items(metas.cmh_items);
327327

328328
sha.reset();
329-
for m_: @ast::meta_item in cmh_items {
329+
for m_: @ast::meta_item in cmh_items {
330330
let m = m_;
331331
alt m.node {
332332
ast::meta_name_value(key, value) {
@@ -429,7 +429,7 @@ fn mangle(ss: &[str]) -> str {
429429

430430
let n = "_ZN"; // Begin name-sequence.
431431

432-
for s: str in ss { n += #fmt("%u%s", str::byte_len(s), s); }
432+
for s: str in ss { n += #fmt("%u%s", str::byte_len(s), s); }
433433
n += "E"; // End name-sequence.
434434

435435
ret n;

trunk/src/comp/back/upcall.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn declare_upcalls(tn: type_names, tydesc_type: TypeRef,
6868
fn decl(tn: type_names, llmod: ModuleRef, name: str, tys: [TypeRef],
6969
rv: TypeRef) -> ValueRef {
7070
let arg_tys: [TypeRef] = ~[];
71-
for t: TypeRef in tys { arg_tys += ~[t]; }
71+
for t: TypeRef in tys { arg_tys += ~[t]; }
7272
let fn_ty = T_fn(arg_tys, rv);
7373
ret trans::decl_cdecl_fn(llmod, "upcall_" + name, fn_ty);
7474
}

trunk/src/comp/driver/rustc.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn parse_cfgspecs(cfgspecs: &[str]) -> ast::crate_cfg {
8282
// FIXME: It would be nice to use the parser to parse all varieties of
8383
// meta_item here. At the moment we just support the meta_word variant.
8484
let words = ~[];
85-
for s: str in cfgspecs { words += ~[attr::mk_word_item(s)]; }
85+
for s: str in cfgspecs { words += ~[attr::mk_word_item(s)]; }
8686
ret words;
8787
}
8888

@@ -334,7 +334,7 @@ fn build_session_options(binary: str, match: getopts::match, binary_dir: str)
334334

335335
let library_search_paths = ~[binary_dir + "/lib"];
336336
let lsp_vec = getopts::opt_strs(match, "L");
337-
for lsp: str in lsp_vec { library_search_paths += ~[lsp]; }
337+
for lsp: str in lsp_vec { library_search_paths += ~[lsp]; }
338338

339339
let parse_only = opt_present(match, "parse-only");
340340
let no_trans = opt_present(match, "no-trans");
@@ -591,7 +591,7 @@ fn main(args: vec[str]) {
591591
}
592592

593593
let cstore = sess.get_cstore();
594-
for cratepath: str in cstore::get_used_crate_files(cstore) {
594+
for cratepath: str in cstore::get_used_crate_files(cstore) {
595595
if str::ends_with(cratepath, ".rlib") {
596596
gcc_args += ~[cratepath];
597597
cont;
@@ -603,10 +603,10 @@ fn main(args: vec[str]) {
603603
}
604604

605605
let ula = cstore::get_used_link_args(cstore);
606-
for arg: str in ula { gcc_args += ~[arg]; }
606+
for arg: str in ula { gcc_args += ~[arg]; }
607607

608608
let used_libs = cstore::get_used_libraries(cstore);
609-
for l: str in used_libs { gcc_args += ~["-l" + l]; }
609+
for l: str in used_libs { gcc_args += ~["-l" + l]; }
610610

611611
if sopts.library {
612612
gcc_args += ~[lib_cmd];

trunk/src/comp/front/attr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export mk_attr;
3131
// linkage
3232
fn find_linkage_metas(attrs: &[ast::attribute]) -> [@ast::meta_item] {
3333
let metas: [@ast::meta_item] = ~[];
34-
for attr: ast::attribute in find_attrs_by_name(attrs, "link") {
34+
for attr: ast::attribute in find_attrs_by_name(attrs, "link") {
3535
alt attr.node.value.node {
3636
ast::meta_list(_, items) { metas += items; }
3737
_ { log "ignoring link attribute that has incorrect type"; }
@@ -96,7 +96,7 @@ fn attr_meta(attr: &ast::attribute) -> @ast::meta_item { @attr.node.value }
9696
// Get the meta_items from inside a vector of attributes
9797
fn attr_metas(attrs: &[ast::attribute]) -> [@ast::meta_item] {
9898
let mitems = ~[];
99-
for a: ast::attribute in attrs { mitems += ~[attr_meta(a)]; }
99+
for a: ast::attribute in attrs { mitems += ~[attr_meta(a)]; }
100100
ret mitems;
101101
}
102102

@@ -124,7 +124,7 @@ fn eq(a: @ast::meta_item, b: @ast::meta_item) -> bool {
124124
fn contains(haystack: &[@ast::meta_item], needle: @ast::meta_item) -> bool {
125125
log #fmt("looking for %s",
126126
syntax::print::pprust::meta_item_to_str(*needle));
127-
for item: @ast::meta_item in haystack {
127+
for item: @ast::meta_item in haystack {
128128
log #fmt("looking in %s",
129129
syntax::print::pprust::meta_item_to_str(*item));
130130
if eq(item, needle) { log "found it!"; ret true; }
@@ -153,12 +153,12 @@ fn sort_meta_items(items: &[@ast::meta_item]) -> [@ast::meta_item] {
153153

154154
// This is sort of stupid here, converting to a vec of mutables and back
155155
let v: [mutable @ast::meta_item] = ~[mutable];
156-
for mi: @ast::meta_item in items { v += ~[mutable mi]; }
156+
for mi: @ast::meta_item in items { v += ~[mutable mi]; }
157157

158158
std::sort::quick_sort(lteq, v);
159159

160160
let v2: [@ast::meta_item] = ~[];
161-
for mi: @ast::meta_item in v { v2 += ~[mi]; }
161+
for mi: @ast::meta_item in v { v2 += ~[mi]; }
162162
ret v2;
163163
}
164164

@@ -179,7 +179,7 @@ fn remove_meta_items_by_name(items: &[@ast::meta_item], name: str) ->
179179
fn require_unique_names(sess: &session::session,
180180
metas: &[@ast::meta_item]) {
181181
let map = map::mk_hashmap[str, ()](str::hash, str::eq);
182-
for meta: @ast::meta_item in metas {
182+
for meta: @ast::meta_item in metas {
183183
let name = get_meta_item_name(meta);
184184
if map.contains_key(name) {
185185
sess.span_fatal(meta.span,

trunk/src/comp/front/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fn in_cfg(cfg: &ast::crate_cfg, attrs: &[ast::attribute]) -> bool {
118118
ivec::foldl(extract_metas, ~[], cfg_metas)
119119
};
120120

121-
for cfg_mi: @ast::meta_item in item_cfg_metas {
121+
for cfg_mi: @ast::meta_item in item_cfg_metas {
122122
if attr::contains(cfg, cfg_mi) { ret true; }
123123
}
124124

trunk/src/comp/front/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ fn mk_test_desc_ivec_ty(cx: &test_ctxt) -> @ast::ty {
229229
fn mk_test_desc_vec(cx: &test_ctxt) -> @ast::expr {
230230
log #fmt("building test vector from %u tests", ivec::len(cx.testfns));
231231
let descs = ~[];
232-
for test: test in cx.testfns {
232+
for test: test in cx.testfns {
233233
let test_ = test; // Satisfy alias analysis
234234
descs += ~[mk_test_desc_rec(cx, test_)];
235235
}

trunk/src/comp/lib/llvm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ fn type_to_str_inner(names: type_names, outer0: &[TypeRef], ty: TypeRef) ->
14691469
fn tys_str(names: type_names, outer: &[TypeRef], tys: &[TypeRef]) -> str {
14701470
let s: str = "";
14711471
let first: bool = true;
1472-
for t: TypeRef in tys {
1472+
for t: TypeRef in tys {
14731473
if first { first = false; } else { s += ", "; }
14741474
s += type_to_str_inner(names, outer, t);
14751475
}
@@ -1531,7 +1531,7 @@ fn type_to_str_inner(names: type_names, outer0: &[TypeRef], ty: TypeRef) ->
15311531

15321532
11 {
15331533
let i: uint = 0u;
1534-
for tout: TypeRef in outer0 {
1534+
for tout: TypeRef in outer0 {
15351535
i += 1u;
15361536
if tout as int == ty as int {
15371537
let n: uint = ivec::len[TypeRef](outer0) - i;

trunk/src/comp/metadata/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn hash_node_id(node_id: &int) -> uint { ret 177573u ^ (node_id as uint); }
6969

7070
fn hash_path(s: &str) -> uint {
7171
let h = 5381u;
72-
for ch: u8 in str::bytes(s) { h = (h << 5u) + h ^ (ch as uint); }
72+
for ch: u8 in str::bytes(s) { h = (h << 5u) + h ^ (ch as uint); }
7373
ret h;
7474
}
7575

trunk/src/comp/metadata/creader.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fn metadata_matches(crate_data: &@[u8], metas: &[@ast::meta_item]) -> bool {
9696
log #fmt("matching %u metadata requirements against %u items",
9797
ivec::len(metas), ivec::len(linkage_metas));
9898

99-
for needed: @ast::meta_item in metas {
99+
for needed: @ast::meta_item in metas {
100100
if !attr::contains(linkage_metas, needed) {
101101
log #fmt("missing %s", pprust::meta_item_to_str(*needed));
102102
ret false;
@@ -156,9 +156,9 @@ fn find_library_crate_aux(nn: &{prefix: str, suffix: str}, crate_name: str,
156156
// stomach from here, and writing a C++ wrapper is more work than just
157157
// manually filtering fs::list_dir here.
158158

159-
for library_search_path: str in library_search_paths {
159+
for library_search_path: str in library_search_paths {
160160
log #fmt("searching %s", library_search_path);
161-
for path: str in fs::list_dir(library_search_path) {
161+
for path: str in fs::list_dir(library_search_path) {
162162
log #fmt("searching %s", path);
163163
let f: str = fs::basename(path);
164164
if !(str::starts_with(f, prefix) && str::ends_with(f, nn.suffix))
@@ -250,7 +250,7 @@ fn resolve_crate_deps(e: env, cdata: &@[u8]) -> cstore::cnum_map {
250250
// The map from crate numbers in the crate we're resolving to local crate
251251
// numbers
252252
let cnum_map = new_int_hash[ast::crate_num]();
253-
for dep: decoder::crate_dep in decoder::get_crate_deps(cdata) {
253+
for dep: decoder::crate_dep in decoder::get_crate_deps(cdata) {
254254
let extrn_cnum = dep.cnum;
255255
let cname = dep.ident;
256256
log #fmt("resolving dep %s", cname);

trunk/src/comp/metadata/decoder.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn lookup_hash(d: &ebml::doc, eq_fn: fn(&[u8]) -> bool , hash: uint) ->
4646

4747
let result: [ebml::doc] = ~[];
4848
let belt = tag_index_buckets_bucket_elt;
49-
for each elt: ebml::doc in ebml::tagged_docs(bucket, belt) {
49+
for each elt: ebml::doc in ebml::tagged_docs(bucket, belt) {
5050
let pos = ebml::be_uint_from_bytes(elt.data, elt.start, 4u);
5151
if eq_fn(ivec::slice[u8](*elt.data, elt.start + 4u, elt.end)) {
5252
result += ~[ebml::doc_at(d.data, pos)];
@@ -138,7 +138,7 @@ fn tag_variant_ids(item: &ebml::doc, this_cnum: ast::crate_num) ->
138138
[ast::def_id] {
139139
let ids: [ast::def_id] = ~[];
140140
let v = tag_items_data_item_variant;
141-
for each p: ebml::doc in ebml::tagged_docs(item, v) {
141+
for each p: ebml::doc in ebml::tagged_docs(item, v) {
142142
let ext = parse_def_id(ebml::doc_data(p));
143143
ids += ~[{crate: this_cnum, node: ext.node}];
144144
}
@@ -156,7 +156,7 @@ fn resolve_path(path: &[ast::ident], data: @[u8]) -> [ast::def_id] {
156156
let paths = ebml::get_doc(md, tag_paths);
157157
let eqer = bind eq_item(_, s);
158158
let result: [ast::def_id] = ~[];
159-
for doc: ebml::doc in lookup_hash(paths, eqer, hash_path(s)) {
159+
for doc: ebml::doc in lookup_hash(paths, eqer, hash_path(s)) {
160160
let did_doc = ebml::get_doc(doc, tag_def_id);
161161
result += ~[parse_def_id(ebml::doc_data(did_doc))];
162162
}
@@ -233,13 +233,13 @@ fn get_tag_variants(data: &@[u8], def: ast::def_id, tcx: &ty::ctxt,
233233
let item = find_item(def.node, items);
234234
let infos: [ty::variant_info] = ~[];
235235
let variant_ids = tag_variant_ids(item, external_crate_id);
236-
for did: ast::def_id in variant_ids {
236+
for did: ast::def_id in variant_ids {
237237
let item = find_item(did.node, items);
238238
let ctor_ty = item_type(item, external_crate_id, tcx, extres);
239239
let arg_tys: [ty::t] = ~[];
240240
alt ty::struct(tcx, ctor_ty) {
241241
ty::ty_fn(_, args, _, _, _) {
242-
for a: ty::arg in args { arg_tys += ~[a.ty]; }
242+
for a: ty::arg in args { arg_tys += ~[a.ty]; }
243243
}
244244
_ {
245245
// Nullary tag variant.
@@ -344,15 +344,15 @@ fn get_attributes(md: &ebml::doc) -> [ast::attribute] {
344344
}
345345

346346
fn list_meta_items(meta_items: &ebml::doc, out: io::writer) {
347-
for mi: @ast::meta_item in get_meta_items(meta_items) {
347+
for mi: @ast::meta_item in get_meta_items(meta_items) {
348348
out.write_str(#fmt("%s\n", pprust::meta_item_to_str(*mi)));
349349
}
350350
}
351351

352352
fn list_crate_attributes(md: &ebml::doc, out: io::writer) {
353353
out.write_str("=Crate Attributes=\n");
354354

355-
for attr: ast::attribute in get_attributes(md) {
355+
for attr: ast::attribute in get_attributes(md) {
356356
out.write_str(#fmt("%s\n", pprust::attribute_to_str(attr)));
357357
}
358358

@@ -382,7 +382,7 @@ fn get_crate_deps(data: @[u8]) -> [crate_dep] {
382382
fn list_crate_deps(data: @[u8], out: io::writer) {
383383
out.write_str("=External Dependencies=\n");
384384

385-
for dep: crate_dep in get_crate_deps(data) {
385+
for dep: crate_dep in get_crate_deps(data) {
386386
out.write_str(#fmt("%d %s\n", dep.cnum, dep.ident));
387387
}
388388

@@ -398,7 +398,7 @@ fn list_crate_items(bytes: &@[u8], md: &ebml::doc, out: io::writer) {
398398
for each bucket: ebml::doc in
399399
ebml::tagged_docs(bs, tag_index_buckets_bucket) {
400400
let et = tag_index_buckets_bucket_elt;
401-
for each elt: ebml::doc in ebml::tagged_docs(bucket, et) {
401+
for each elt: ebml::doc in ebml::tagged_docs(bucket, et) {
402402
let data = read_path(elt);
403403
let def = ebml::doc_at(bytes, data.pos);
404404
let did_doc = ebml::get_doc(def, tag_def_id);

0 commit comments

Comments
 (0)