From a2a8596c3dd963e7b51f11998cffc46033bf6d63 Mon Sep 17 00:00:00 2001 From: Youngmin Yoo Date: Tue, 14 May 2013 18:52:12 +0900 Subject: [PATCH] Rename vec::len(var) to var.len() --- .swo | Bin 0 -> 73728 bytes src/compiletest/runtest.rs | 12 +++++------ src/libcore/either.rs | 20 +++++++++--------- src/libcore/io.rs | 12 +++++------ src/libcore/os.rs | 6 +++--- src/libcore/ptr.rs | 2 +- src/libcore/rt/uvll.rs | 2 +- src/libcore/str.rs | 8 +++---- src/libfuzzer/ast_match.rs | 4 ++-- src/libfuzzer/cycles.rs | 2 +- src/libfuzzer/rand_util.rs | 6 +++--- src/librustc/back/rpath.rs | 4 ++-- src/librustc/driver/driver.rs | 3 +-- src/librustc/front/test.rs | 2 +- src/librustc/metadata/decoder.rs | 2 +- src/librustc/metadata/loader.rs | 2 +- src/librustc/metadata/tydecode.rs | 2 +- src/librustc/middle/kind.rs | 2 +- src/librustc/middle/region.rs | 4 ++-- src/librustc/middle/resolve.rs | 2 +- src/librustc/middle/resolve_stage0.rs | 2 +- src/librustc/middle/trans/cabi.rs | 6 +++--- src/librustc/middle/trans/cabi_x86_64.rs | 8 +++---- src/librustc/middle/trans/foreign.rs | 2 +- src/librustc/middle/trans/reflect.rs | 10 ++++----- src/librustc/middle/trans/shape.rs | 3 +-- src/librustc/middle/ty.rs | 2 +- src/librustc/middle/typeck/check/mod.rs | 2 +- src/librustc/middle/typeck/collect.rs | 8 +++---- src/librustc/middle/typeck/mod.rs | 2 +- src/librustc/util/ppaux.rs | 2 +- src/librustdoc/tystr_pass.rs | 2 +- src/libstd/ebml.rs | 5 ++--- src/libstd/md4.rs | 4 ++-- src/libstd/net_ip.rs | 5 ++--- src/libstd/net_tcp.rs | 6 +++--- src/libstd/par.rs | 5 ++--- src/libstd/rope.rs | 4 ++-- src/libstd/sha1.rs | 6 +++--- src/libstd/sync.rs | 13 ++++++------ src/libstd/test.rs | 4 ++-- src/libstd/uv_ll.rs | 2 +- src/libsyntax/diagnostic.rs | 6 +++--- src/libsyntax/ext/auto_encode.rs | 4 ++-- src/libsyntax/ext/base.rs | 2 +- src/libsyntax/parse/comments.rs | 2 +- src/libsyntax/parse/parser.rs | 4 ++-- src/libsyntax/print/pp.rs | 4 ++-- src/libsyntax/print/pprust.rs | 6 +++--- src/test/auxiliary/cci_iter_lib.rs | 2 +- src/test/auxiliary/cci_no_inline_lib.rs | 2 +- src/test/bench/graph500-bfs.rs | 4 ++-- src/test/bench/shootout-k-nucleotide-pipes.rs | 2 +- src/test/bench/sudoku.rs | 6 +++--- src/test/run-pass/assignability-trait.rs | 6 +++--- .../class-implements-multiple-traits.rs | 2 +- src/test/run-pass/hashmap-memory.rs | 2 +- src/test/run-pass/vec-self-append.rs | 8 +++---- 58 files changed, 128 insertions(+), 134 deletions(-) create mode 100644 .swo diff --git a/.swo b/.swo new file mode 100644 index 0000000000000000000000000000000000000000..89f7479da33151987cc73f04a49464fb3bd39866 GIT binary patch literal 73728 zcmeIb3!G$0UFTb%JbeQ01r*scJx)({PgQkhR@RfAW`?nm!FkcsGmbXBIr%tQope@a zk&o)GnVtq;7g(>WD6FE_6~Wb&bwvcc%0py9yn=8QANX2yVOiv&hytQ63;X^3BjV&a zCo`*S5cT7Jsz3d!lbI(XPMm-I;~(*VL`1!K_szFPtBXr>{QFA%asQ4zb8c>TtKALX z_qyI0_jh_Lm4(V)i4N`^P~d<9|HKq{)Ll#EQc;z-`p{L;;~sn0KXH8y9)CcA0}32a z;D7=L6gZ&30R;{ya6o|r3jAYIV7UDibI;>}U*sQp%3q)SF!$jh{`(jE>z2P>&fWK4 z=j#6cM|1Zd?tgFi>#hEWQ2rzQ?|1m?&*ttw(*GXHpYs_){zv)yw}*7O`;Yd&*ZlQ0 zx%*$@e-HJ0tbbrA|4aS-GyXct-TyNG`#1aRZ{+TOx&QrJ{Pl>ha47#P{O|Yr>$m6b z2h&V={s(jSALH{q(O*ya7Y^kg+;@ce=Sm;ntOu6^3LH@2fC2{;IH14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GyNLxuWl(5?DXg7|V zgQGC5f=OVhe(!=dnA#7uE*iCPS}9;)f7EhW5^7ycQ>*45@7`zpmea{cn6KW&-h=}b zh%A7e-8-=cWYq4*(_W##`CVSXimZFqJ(qTRrT5vy`2J=z@x^^Lv7`aJ?`h+8ci{)G zT*sq7^)r&Yp1rbOS&5riJL=_9xwJGpwm;jmrZkQc)EwYEVcM*1I}$1VC|B~J~zr6R=GwjNodDP({5soCUuodO+Seh&6= zz23IdJj05oAVgHQ8yyQ;Ms-{(zxB{WF;od!%I&f`iIAHvx!VbyP#4dqRW+5M(N*Pp zAK18(&L)%}4%GoPltqpU@%oFaYZ|vkw~mLQ%>j|^ z_I2HE7zAApBj<6bq-|3QUAK9Px|;O=Gw9-f2&Df%(QBac|NjzrC3qp&0yl!M1CIdj zMdyDt_&#s}JR95yo(vuZK7tKEYXW`&X#ao31w0Kr3j9rY-dNi`_;f&l0}32a;D7=L z6gZ&30R;{ya6o|r3LH@2??VBvGDTWs!482OJ}vd<==D)K9W>UC7O=pi)bj`Hb4#>o zOiX57^#?!6vXg!?T4<7#1tY!wRfQ=>M1?}e5gj#CwlgIKqp04{7nSJe)xuTuC%uE(;=4nIe*tvm|KtDw literal 0 HcmV?d00001 diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 73e1e3ee763..d58c2e596bd 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -264,7 +264,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) { fatal(~"gdb failed to execute"); } - let num_check_lines = vec::len(check_lines); + let num_check_lines = check_lines.len(); if num_check_lines > 0 { // check if each line in props.check_lines appears in the // output (in order) @@ -303,7 +303,7 @@ fn check_error_patterns(props: &TestProps, if str::contains(line, *next_err_pat) { debug!("found error pattern %s", *next_err_pat); next_err_idx += 1u; - if next_err_idx == vec::len(props.error_patterns) { + if next_err_idx == props.error_patterns.len() { debug!("found all error patterns"); done = true; break; @@ -315,8 +315,8 @@ fn check_error_patterns(props: &TestProps, let missing_patterns = vec::slice(props.error_patterns, next_err_idx, - vec::len(props.error_patterns)); - if vec::len(missing_patterns) == 1u { + props.error_patterns.len()); + if missing_patterns.len() == 1u { fatal_ProcRes(fmt!("error pattern '%s' not found!", missing_patterns[0]), ProcRes); } else { @@ -333,7 +333,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError], // true if we found the error in question let mut found_flags = vec::from_elem( - vec::len(expected_errors), false); + expected_errors.len(), false); if ProcRes.status == 0 { fatal(~"process did not return an error status"); @@ -377,7 +377,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError], } } - for uint::range(0u, vec::len(found_flags)) |i| { + for uint::range(0u, found_flags.len()) |i| { if !found_flags[i] { let ee = &expected_errors[i]; fatal_ProcRes(fmt!("expected %s on line %u not found: %s", diff --git a/src/libcore/either.rs b/src/libcore/either.rs index 618a484a515..8c16f5c6482 100644 --- a/src/libcore/either.rs +++ b/src/libcore/either.rs @@ -201,14 +201,14 @@ fn test_lefts() { fn test_lefts_none() { let input: ~[Either] = ~[Right(10), Right(10)]; let result = lefts(input); - assert_eq!(vec::len(result), 0u); + assert_eq!(result.len(), 0u); } #[test] fn test_lefts_empty() { let input: ~[Either] = ~[]; let result = lefts(input); - assert_eq!(vec::len(result), 0u); + assert_eq!(result.len(), 0u); } #[test] @@ -222,14 +222,14 @@ fn test_rights() { fn test_rights_none() { let input: ~[Either] = ~[Left(10), Left(10)]; let result = rights(input); - assert_eq!(vec::len(result), 0u); + assert_eq!(result.len(), 0u); } #[test] fn test_rights_empty() { let input: ~[Either] = ~[]; let result = rights(input); - assert_eq!(vec::len(result), 0u); + assert_eq!(result.len(), 0u); } #[test] @@ -247,22 +247,22 @@ fn test_partition() { fn test_partition_no_lefts() { let input: ~[Either] = ~[Right(10), Right(11)]; let (lefts, rights) = partition(input); - assert_eq!(vec::len(lefts), 0u); - assert_eq!(vec::len(rights), 2u); + assert_eq!(lefts.len(), 0u); + assert_eq!(rights.len(), 2u); } #[test] fn test_partition_no_rights() { let input: ~[Either] = ~[Left(10), Left(11)]; let (lefts, rights) = partition(input); - assert_eq!(vec::len(lefts), 2u); - assert_eq!(vec::len(rights), 0u); + assert_eq!(lefts.len(), 2u); + assert_eq!(rights.len(), 0u); } #[test] fn test_partition_empty() { let input: ~[Either] = ~[]; let (lefts, rights) = partition(input); - assert_eq!(vec::len(lefts), 0u); - assert_eq!(vec::len(rights), 0u); + assert_eq!(lefts.len(), 0u); + assert_eq!(rights.len(), 0u); } diff --git a/src/libcore/io.rs b/src/libcore/io.rs index ab5db67ddb6..7b7d278380f 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -673,10 +673,10 @@ impl ReaderUtil for T { fn read_char(&self) -> char { let c = self.read_chars(1); - if vec::len(c) == 0 { + if c.len() == 0 { return -1 as char; // FIXME will this stay valid? // #2004 } - assert!((vec::len(c) == 1)); + assert!(c.len() == 1); return c[0]; } @@ -1802,7 +1802,7 @@ mod tests { fn test_readchars_empty() { do io::with_str_reader(~"") |inp| { let res : ~[char] = inp.read_chars(128); - assert!((vec::len(res) == 0)); + assert!(res.len() == 0); } } @@ -1841,10 +1841,10 @@ mod tests { fn check_read_ln(len : uint, s: &str, ivals: &[int]) { do io::with_str_reader(s) |inp| { let res : ~[char] = inp.read_chars(len); - if (len <= vec::len(ivals)) { - assert!((vec::len(res) == len)); + if len <= ivals.len() { + assert!(res.len() == len); } - assert!(vec::slice(ivals, 0u, vec::len(res)) == + assert!(vec::slice(ivals, 0u, res.len()) == vec::map(res, |x| *x as int)); } } diff --git a/src/libcore/os.rs b/src/libcore/os.rs index 9129b33fff5..daad9cee0fc 100644 --- a/src/libcore/os.rs +++ b/src/libcore/os.rs @@ -410,7 +410,7 @@ pub fn self_exe_path() -> Option { KERN_PROC as c_int, KERN_PROC_PATHNAME as c_int, -1 as c_int]; let mut sz = sz; - sysctl(vec::raw::to_ptr(mib), vec::len(mib) as ::libc::c_uint, + sysctl(vec::raw::to_ptr(mib), mib.len() as ::libc::c_uint, buf as *mut c_void, &mut sz, ptr::null(), 0u as size_t) == (0 as c_int) } @@ -1490,7 +1490,7 @@ mod tests { #[ignore] fn test_env_getenv() { let e = env(); - assert!(vec::len(e) > 0u); + assert!(e.len() > 0u); for e.each |p| { let (n, v) = copy *p; debug!(copy n); @@ -1581,7 +1581,7 @@ mod tests { fn list_dir() { let dirs = os::list_dir(&Path(".")); // Just assuming that we've got some contents in the current directory - assert!((vec::len(dirs) > 0u)); + assert!(dirs.len() > 0u); for dirs.each |dir| { debug!(copy *dir); diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 9feb8676036..e116dc01943 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -441,7 +441,7 @@ pub mod ptr_tests { let arr_ptr = &arr[0]; let mut ctr = 0; let mut iteration_count = 0; - array_each_with_len(arr_ptr, vec::len(arr), + array_each_with_len(arr_ptr, arr.len(), |e| { let actual = str::raw::from_c_str(e); let expected = copy expected_arr[ctr]; diff --git a/src/libcore/rt/uvll.rs b/src/libcore/rt/uvll.rs index 4bff3bff7d3..0d298bde6b5 100644 --- a/src/libcore/rt/uvll.rs +++ b/src/libcore/rt/uvll.rs @@ -221,7 +221,7 @@ pub unsafe fn accept(server: *c_void, client: *c_void) -> c_int { pub unsafe fn write(req: *uv_write_t, stream: *T, buf_in: &[uv_buf_t], cb: *u8) -> c_int { let buf_ptr = vec::raw::to_ptr(buf_in); - let buf_cnt = vec::len(buf_in) as i32; + let buf_cnt = buf_in.len() as i32; return rust_uv_write(req as *c_void, stream as *c_void, buf_ptr, buf_cnt, cb); } pub unsafe fn read_start(stream: *uv_stream_t, on_alloc: *u8, on_read: *u8) -> c_int { diff --git a/src/libcore/str.rs b/src/libcore/str.rs index ce9db796b67..ec7177e5211 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -2059,7 +2059,7 @@ pub fn is_utf8(v: &const [u8]) -> bool { /// Determines if a vector of `u16` contains valid UTF-16 pub fn is_utf16(v: &[u16]) -> bool { - let len = vec::len(v); + let len = v.len(); let mut i = 0u; while (i < len) { let u = v[i]; @@ -2103,7 +2103,7 @@ pub fn to_utf16(s: &str) -> ~[u16] { } pub fn utf16_chars(v: &[u16], f: &fn(char)) { - let len = vec::len(v); + let len = v.len(); let mut i = 0u; while (i < len && v[i] != 0u16) { let u = v[i]; @@ -2128,7 +2128,7 @@ pub fn utf16_chars(v: &[u16], f: &fn(char)) { pub fn from_utf16(v: &[u16]) -> ~str { let mut buf = ~""; - reserve(&mut buf, vec::len(v)); + reserve(&mut buf, v.len()); utf16_chars(v, |ch| push_char(&mut buf, ch)); buf } @@ -2398,7 +2398,7 @@ static tag_six_b: uint = 252u; * # Example * * ~~~ - * let i = str::as_bytes("Hello World") { |bytes| vec::len(bytes) }; + * let i = str::as_bytes("Hello World") { |bytes| bytes.len() }; * ~~~ */ #[inline] diff --git a/src/libfuzzer/ast_match.rs b/src/libfuzzer/ast_match.rs index 806a7aedd31..2502830250d 100644 --- a/src/libfuzzer/ast_match.rs +++ b/src/libfuzzer/ast_match.rs @@ -15,8 +15,8 @@ fn vec_equal(v: ~[T], u: ~[T], element_equality_test: @fn(&&T, &&T) -> bool) -> bool { - let Lv = vec::len(v); - if Lv != vec::len(u) { return false; } + let Lv = v.len(); + if Lv != u.len() { return false; } let i = 0u; while i < Lv { if !element_equality_test(v[i], u[i]) { return false; } diff --git a/src/libfuzzer/cycles.rs b/src/libfuzzer/cycles.rs index c18d1f43b56..a6434d64cdc 100644 --- a/src/libfuzzer/cycles.rs +++ b/src/libfuzzer/cycles.rs @@ -19,7 +19,7 @@ fn under(r : rand::rng, n : uint) -> uint { // random choice from a vec fn choice(r : rand::rng, v : ~[const T]) -> T { - assert!(vec::len(v) != 0u); v[under(r, vec::len(v))] + assert!(v.len() != 0u); v[under(r, v.len())] } // k in n chance of being true diff --git a/src/libfuzzer/rand_util.rs b/src/libfuzzer/rand_util.rs index 2422c146e24..c239e8ab933 100644 --- a/src/libfuzzer/rand_util.rs +++ b/src/libfuzzer/rand_util.rs @@ -18,7 +18,7 @@ fn under(r : rand::rng, n : uint) -> uint { // random choice from a vec fn choice(r : rand::rng, v : ~[T]) -> T { - assert!(vec::len(v) != 0u); v[under(r, vec::len(v))] + assert!(v.len() != 0u); v[under(r, v.len())] } // 1 in n chance of being true @@ -26,7 +26,7 @@ fn unlikely(r : rand::rng, n : uint) -> bool { under(r, n) == 0u } // shuffle a vec in place fn shuffle(r : rand::rng, &v : ~[T]) { - let i = vec::len(v); + let i = v.len(); while i >= 2u { // Loop invariant: elements with index >= i have been locked in place. i -= 1u; @@ -49,7 +49,7 @@ fn shuffled(r : rand::rng, v : ~[T]) -> ~[T] { // * weighted_vec is O(total weight) space type weighted = { weight: uint, item: T }; fn weighted_choice(r : rand::rng, v : ~[weighted]) -> T { - assert!(vec::len(v) != 0u); + assert!(v.len() != 0u); let total = 0u; for {weight: weight, item: _} in v { total += weight; diff --git a/src/librustc/back/rpath.rs b/src/librustc/back/rpath.rs index eebb20b19f5..37a025cd820 100644 --- a/src/librustc/back/rpath.rs +++ b/src/librustc/back/rpath.rs @@ -137,8 +137,8 @@ pub fn get_relative_to(abs1: &Path, abs2: &Path) -> Path { abs1.to_str(), abs2.to_str()); let split1: &[~str] = abs1.components; let split2: &[~str] = abs2.components; - let len1 = vec::len(split1); - let len2 = vec::len(split2); + let len1 = split1.len(); + let len2 = split2.len(); assert!(len1 > 0); assert!(len2 > 0); diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs index b11aec5b841..0e37653e5c4 100644 --- a/src/librustc/driver/driver.rs +++ b/src/librustc/driver/driver.rs @@ -905,7 +905,6 @@ mod test { use driver::driver::{build_configuration, build_session}; use driver::driver::{build_session_options, optgroups, str_input}; - use core::vec; use std::getopts::groups::getopts; use std::getopts; use syntax::attr; @@ -942,6 +941,6 @@ mod test { let sess = build_session(sessopts, diagnostic::emit); let cfg = build_configuration(sess, @~"whatever", &str_input(~"")); let test_items = attr::find_meta_items_by_name(cfg, ~"test"); - assert!((vec::len(test_items) == 1u)); + assert!(test_items.len() == 1u); } } diff --git a/src/librustc/front/test.rs b/src/librustc/front/test.rs index f556baee918..be03ed99ad7 100644 --- a/src/librustc/front/test.rs +++ b/src/librustc/front/test.rs @@ -206,7 +206,7 @@ fn is_bench_fn(i: @ast::item) -> bool { fn has_test_signature(i: @ast::item) -> bool { match i.node { ast::item_fn(ref decl, _, _, ref generics, _) => { - let input_cnt = vec::len(decl.inputs); + let input_cnt = decl.inputs.len(); let no_output = match decl.output.node { ast::ty_nil => true, _ => false diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs index c3dd9cdf23b..3bda02f8b3b 100644 --- a/src/librustc/metadata/decoder.rs +++ b/src/librustc/metadata/decoder.rs @@ -1061,7 +1061,7 @@ fn get_attributes(md: ebml::Doc) -> ~[ast::attribute] { let meta_items = get_meta_items(attr_doc); // Currently it's only possible to have a single meta item on // an attribute - assert!((vec::len(meta_items) == 1u)); + assert!(meta_items.len() == 1u); let meta_item = meta_items[0]; attrs.push( codemap::spanned { diff --git a/src/librustc/metadata/loader.rs b/src/librustc/metadata/loader.rs index ba2e336b639..cfb2bd4b837 100644 --- a/src/librustc/metadata/loader.rs +++ b/src/librustc/metadata/loader.rs @@ -171,7 +171,7 @@ pub fn metadata_matches(extern_metas: &[@ast::meta_item], local_metas: &[@ast::meta_item]) -> bool { debug!("matching %u metadata requirements against %u items", - vec::len(local_metas), vec::len(extern_metas)); + local_metas.len(), extern_metas.len()); for local_metas.each |needed| { if !attr::contains(extern_metas, *needed) { diff --git a/src/librustc/metadata/tydecode.rs b/src/librustc/metadata/tydecode.rs index cc9a18ea3a3..95e48baead8 100644 --- a/src/librustc/metadata/tydecode.rs +++ b/src/librustc/metadata/tydecode.rs @@ -519,7 +519,7 @@ fn parse_sig(st: @mut PState, conv: conv_did) -> ty::FnSig { // Rust metadata parsing pub fn parse_def_id(buf: &[u8]) -> ast::def_id { let mut colon_idx = 0u; - let len = vec::len(buf); + let len = buf.len(); while colon_idx < len && buf[colon_idx] != ':' as u8 { colon_idx += 1u; } if colon_idx == len { error!("didn't find ':' when parsing def id"); diff --git a/src/librustc/middle/kind.rs b/src/librustc/middle/kind.rs index b220379e330..a891e8d3b7f 100644 --- a/src/librustc/middle/kind.rs +++ b/src/librustc/middle/kind.rs @@ -360,7 +360,7 @@ fn is_nullary_variant(cx: Context, ex: @expr) -> bool { expr_path(_) => { match cx.tcx.def_map.get_copy(&ex.id) { def_variant(edid, vdid) => { - vec::len(ty::enum_variant_with_id(cx.tcx, edid, vdid).args) == 0u + vec::len(ty::enum_variant_with_id(cx.tcx, edid, vdid).args) == 0u } _ => false } diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index 2c62130feb1..27b62738793 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -283,8 +283,8 @@ pub impl RegionMaps { let a_ancestors = ancestors_of(self, scope_a); let b_ancestors = ancestors_of(self, scope_b); - let mut a_index = vec::len(a_ancestors) - 1u; - let mut b_index = vec::len(b_ancestors) - 1u; + let mut a_index = a_ancestors.len() - 1u; + let mut b_index = b_ancestors.len() - 1u; // Here, ~[ab]_ancestors is a vector going from narrow to broad. // The end of each vector will be the item where the scope is diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs index a962ea07c54..2f13343c5fa 100644 --- a/src/librustc/middle/resolve.rs +++ b/src/librustc/middle/resolve.rs @@ -4693,7 +4693,7 @@ pub impl Resolver { } } - if vec::len(values) > 0 && + if values.len() > 0 && values[smallest] != uint::max_value && values[smallest] < str::len(name) + 2 && values[smallest] <= max_distance && diff --git a/src/librustc/middle/resolve_stage0.rs b/src/librustc/middle/resolve_stage0.rs index 2fc0fdca317..0932feb9ce5 100644 --- a/src/librustc/middle/resolve_stage0.rs +++ b/src/librustc/middle/resolve_stage0.rs @@ -4720,7 +4720,7 @@ pub impl Resolver { } } - if vec::len(values) > 0 && + if values.len() > 0 && values[smallest] != uint::max_value && values[smallest] < str::len(name) + 2 && values[smallest] <= max_distance && diff --git a/src/librustc/middle/trans/cabi.rs b/src/librustc/middle/trans/cabi.rs index 702d62f1363..e103bbc5de7 100644 --- a/src/librustc/middle/trans/cabi.rs +++ b/src/librustc/middle/trans/cabi.rs @@ -65,7 +65,7 @@ pub impl FnType { let mut llargvals = ~[]; let mut i = 0u; - let n = vec::len(arg_tys); + let n = arg_tys.len(); if self.sret { let llretptr = GEPi(bcx, llargbundle, [0u, n]); @@ -113,7 +113,7 @@ pub impl FnType { if self.sret || !ret_def { return; } - let n = vec::len(arg_tys); + let n = arg_tys.len(); // R** llretptr = &args->r; let llretptr = GEPi(bcx, llargbundle, [0u, n]); // R* llretloc = *llretptr; /* (args->r) */ @@ -149,7 +149,7 @@ pub impl FnType { }; let mut i = 0u; - let n = vec::len(atys); + let n = atys.len(); while i < n { let mut argval = get_param(llwrapfn, i + j); if attrs[i].is_some() { diff --git a/src/librustc/middle/trans/cabi_x86_64.rs b/src/librustc/middle/trans/cabi_x86_64.rs index 3a2ab74c33a..a44f203c7ab 100644 --- a/src/librustc/middle/trans/cabi_x86_64.rs +++ b/src/librustc/middle/trans/cabi_x86_64.rs @@ -50,7 +50,7 @@ fn is_sse(c: x86_64_reg_class) -> bool { } fn is_ymm(cls: &[x86_64_reg_class]) -> bool { - let len = vec::len(cls); + let len = cls.len(); return (len > 2u && is_sse(cls[0]) && cls[1] == sseup_class && @@ -223,8 +223,8 @@ fn classify_ty(ty: TypeRef) -> ~[x86_64_reg_class] { unsafe { let mut i = 0u; let llty = llvm::LLVMGetTypeKind(ty) as int; - let e = vec::len(cls); - if vec::len(cls) > 2u && + let e = cls.len(); + if cls.len() > 2u && (llty == 10 /* struct */ || llty == 11 /* array */) { if is_sse(cls[i]) { @@ -295,7 +295,7 @@ fn llreg_ty(cls: &[x86_64_reg_class]) -> TypeRef { unsafe { let mut tys = ~[]; let mut i = 0u; - let e = vec::len(cls); + let e = cls.len(); while i < e { match cls[i] { integer_class => { diff --git a/src/librustc/middle/trans/foreign.rs b/src/librustc/middle/trans/foreign.rs index fcf5d05a744..498881fcfc6 100644 --- a/src/librustc/middle/trans/foreign.rs +++ b/src/librustc/middle/trans/foreign.rs @@ -509,7 +509,7 @@ pub fn trans_foreign_mod(ccx: @CrateContext, llargbundle: ValueRef) { let _icx = bcx.insn_ctxt("foreign::wrap::build_args"); let ccx = bcx.ccx(); - let n = vec::len(tys.llsig.llarg_tys); + let n = tys.llsig.llarg_tys.len(); let implicit_args = first_real_arg; // return + env for uint::range(0, n) |i| { let mut llargval = get_param(llwrapfn, i + implicit_args); diff --git a/src/librustc/middle/trans/reflect.rs b/src/librustc/middle/trans/reflect.rs index 2183472d591..9aea12fa8e2 100644 --- a/src/librustc/middle/trans/reflect.rs +++ b/src/librustc/middle/trans/reflect.rs @@ -93,7 +93,7 @@ pub impl Reflector { let mth_ty = ty::mk_bare_fn(tcx, copy self.visitor_methods[mth_idx].fty); let v = self.visitor_val; - debug!("passing %u args:", vec::len(args)); + debug!("passing %u args:", args.len()); let bcx = self.bcx; for args.eachi |i, a| { debug!("arg %u: %s", i, val_str(bcx.ccx().tn, *a)); @@ -224,7 +224,7 @@ pub impl Reflector { let retval = if ty::type_is_bot(fty.sig.output) {0u} else {1u}; let extra = ~[self.c_uint(pureval), self.c_uint(sigilval), - self.c_uint(vec::len(fty.sig.inputs)), + self.c_uint(fty.sig.inputs.len()), self.c_uint(retval)]; self.visit(~"enter_fn", copy extra); // XXX: Bad copy. self.visit_sig(retval, &fty.sig); @@ -239,7 +239,7 @@ pub impl Reflector { let retval = if ty::type_is_bot(fty.sig.output) {0u} else {1u}; let extra = ~[self.c_uint(pureval), self.c_uint(sigilval), - self.c_uint(vec::len(fty.sig.inputs)), + self.c_uint(fty.sig.inputs.len()), self.c_uint(retval)]; self.visit(~"enter_fn", copy extra); // XXX: Bad copy. self.visit_sig(retval, &fty.sig); @@ -309,13 +309,13 @@ pub impl Reflector { llfdecl }; - let enum_args = ~[self.c_uint(vec::len(variants)), make_get_disr()] + let enum_args = ~[self.c_uint(variants.len()), make_get_disr()] + self.c_size_and_align(t); do self.bracketed(~"enum", enum_args) |this| { for variants.eachi |i, v| { let variant_args = ~[this.c_uint(i), this.c_int(v.disr_val), - this.c_uint(vec::len(v.args)), + this.c_uint(v.args.len()), this.c_slice(ccx.sess.str_of(v.name))]; do this.bracketed(~"enum_variant", variant_args) |this| { for v.args.eachi |j, a| { diff --git a/src/librustc/middle/trans/shape.rs b/src/librustc/middle/trans/shape.rs index 6ff9e1cfc57..31de1280741 100644 --- a/src/librustc/middle/trans/shape.rs +++ b/src/librustc/middle/trans/shape.rs @@ -18,7 +18,6 @@ use middle::trans::common::*; use middle::trans; use core::str; -use core::vec; pub struct Ctxt { next_tag_id: u16, @@ -71,6 +70,6 @@ pub fn add_u16(dest: &mut ~[u8], val: u16) { } pub fn add_substr(dest: &mut ~[u8], src: ~[u8]) { - add_u16(&mut *dest, vec::len(src) as u16); + add_u16(&mut *dest, src.len() as u16); *dest += src; } diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index fbb84751d03..96e2e28e6f3 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -2616,7 +2616,7 @@ pub fn deref_sty(cx: ctxt, sty: &sty, explicit: bool) -> Option { ty_enum(did, ref substs) => { let variants = enum_variants(cx, did); - if vec::len(*variants) == 1u && vec::len(variants[0].args) == 1u { + if (*variants).len() == 1u && variants[0].args.len() == 1u { let v_t = subst(cx, substs, variants[0].args[0]); Some(mt {ty: v_t, mutbl: ast::m_imm}) } else { diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs index fd511b6fc53..1783e336f5a 100644 --- a/src/librustc/middle/typeck/check/mod.rs +++ b/src/librustc/middle/typeck/check/mod.rs @@ -3281,7 +3281,7 @@ pub fn instantiate_path(fcx: @mut FnCtxt, debug!(">>> instantiate_path"); let ty_param_count = tpt.generics.type_param_defs.len(); - let ty_substs_len = vec::len(pth.types); + let ty_substs_len = pth.types.len(); debug!("ty_param_count=%? ty_substs_len=%?", ty_param_count, diff --git a/src/librustc/middle/typeck/collect.rs b/src/librustc/middle/typeck/collect.rs index dd432352432..608986d600c 100644 --- a/src/librustc/middle/typeck/collect.rs +++ b/src/librustc/middle/typeck/collect.rs @@ -499,15 +499,15 @@ pub fn compare_impl_method(tcx: ty::ctxt, return; } - if vec::len(impl_m.fty.sig.inputs) != vec::len(trait_m.fty.sig.inputs) { + if impl_m.fty.sig.inputs.len() != trait_m.fty.sig.inputs.len() { tcx.sess.span_err( cm.span, fmt!("method `%s` has %u parameter%s \ but the trait has %u", *tcx.sess.str_of(trait_m.ident), - vec::len(impl_m.fty.sig.inputs), - if vec::len(impl_m.fty.sig.inputs) == 1 { "" } else { "s" }, - vec::len(trait_m.fty.sig.inputs))); + impl_m.fty.sig.inputs.len(), + if impl_m.fty.sig.inputs.len() == 1 { "" } else { "s" }, + trait_m.fty.sig.inputs.len())); return; } diff --git a/src/librustc/middle/typeck/mod.rs b/src/librustc/middle/typeck/mod.rs index 5da14d99171..6e73b8d27de 100644 --- a/src/librustc/middle/typeck/mod.rs +++ b/src/librustc/middle/typeck/mod.rs @@ -310,7 +310,7 @@ fn check_main_fn_ty(ccx: @mut CrateCtxt, _ => () } let mut ok = ty::type_is_nil(fn_ty.sig.output); - let num_args = vec::len(fn_ty.sig.inputs); + let num_args = fn_ty.sig.inputs.len(); ok &= num_args == 0u; if !ok { tcx.sess.span_err( diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs index 804b23025f0..1807c7955f9 100644 --- a/src/librustc/util/ppaux.rs +++ b/src/librustc/util/ppaux.rs @@ -470,7 +470,7 @@ pub fn parameterized(cx: ctxt, } }; - if vec::len(tps) > 0u { + if tps.len() > 0u { let strs = vec::map(tps, |t| ty_to_str(cx, *t)); fmt!("%s%s<%s>", base, r_str, str::connect(strs, ",")) } else { diff --git a/src/librustdoc/tystr_pass.rs b/src/librustdoc/tystr_pass.rs index bd6777df4af..a08c98d2b72 100644 --- a/src/librustdoc/tystr_pass.rs +++ b/src/librustdoc/tystr_pass.rs @@ -405,7 +405,7 @@ mod test { #[test] fn should_not_add_impl_trait_types_if_none() { let doc = mk_doc(~"impl int { fn a() { } }"); - assert!(vec::len(doc.cratemod().impls()[0].trait_types) == 0); + assert!(doc.cratemod().impls()[0].trait_types.len() == 0); } #[test] diff --git a/src/libstd/ebml.rs b/src/libstd/ebml.rs index 062ad403dd6..07c1c226d1f 100644 --- a/src/libstd/ebml.rs +++ b/src/libstd/ebml.rs @@ -628,7 +628,6 @@ pub mod writer { use core::io; use core::str; - use core::vec; // ebml writing pub struct Encoder { @@ -707,7 +706,7 @@ pub mod writer { fn wr_tagged_bytes(&mut self, tag_id: uint, b: &[u8]) { write_vuint(self.writer, tag_id); - write_vuint(self.writer, vec::len(b)); + write_vuint(self.writer, b.len()); self.writer.write(b); } @@ -760,7 +759,7 @@ pub mod writer { } fn wr_bytes(&mut self, b: &[u8]) { - debug!("Write %u bytes", vec::len(b)); + debug!("Write %u bytes", b.len()); self.writer.write(b); } diff --git a/src/libstd/md4.rs b/src/libstd/md4.rs index 71b62ca36a5..84561256cd1 100644 --- a/src/libstd/md4.rs +++ b/src/libstd/md4.rs @@ -23,7 +23,7 @@ pub fn md4(msg: &[u8]) -> Quad { // subtle: if orig_len is merely uint, then the code below // which performs shifts by 32 bits or more has undefined // results. - let orig_len: u64 = (vec::len(msg) * 8u) as u64; + let orig_len: u64 = (msg.len() * 8u) as u64; // pad message let mut msg = vec::append(vec::to_owned(msg), ~[0x80u8]); @@ -51,7 +51,7 @@ pub fn md4(msg: &[u8]) -> Quad { } let mut i = 0u; - let e = vec::len(msg); + let e = msg.len(); let mut x = vec::from_elem(16u, 0u32); while i < e { let aa = a, bb = b, cc = c, dd = d; diff --git a/src/libstd/net_ip.rs b/src/libstd/net_ip.rs index f928f10b5fc..cc4e7ee0204 100644 --- a/src/libstd/net_ip.rs +++ b/src/libstd/net_ip.rs @@ -15,7 +15,6 @@ use core::comm::{stream, SharedChan}; use core::ptr; use core::result; use core::str; -use core::vec; use iotask = uv::iotask::IoTask; use interact = uv::iotask::interact; @@ -340,7 +339,7 @@ extern fn get_addr_cb(handle: *uv_getaddrinfo_t, } } debug!("successful process addrinfo result, len: %?", - vec::len(out_vec)); + out_vec.len()); output_ch.send(result::Ok(out_vec)); } else { @@ -424,7 +423,7 @@ mod test { // this.. mostly just wanting to see it work, atm. let results = result::unwrap(ga_result); debug!("test_get_addr: Number of results for %s: %?", - localhost_name, vec::len(results)); + localhost_name, results.len()); for results.each |r| { let ipv_prefix = match *r { Ipv4(_) => ~"IPv4", diff --git a/src/libstd/net_tcp.rs b/src/libstd/net_tcp.rs index 9387903d842..37578e42baf 100644 --- a/src/libstd/net_tcp.rs +++ b/src/libstd/net_tcp.rs @@ -1802,7 +1802,7 @@ mod test { debug!("BUF_WRITE: val len %?", str::len(val)); do str::byte_slice(val) |b_slice| { debug!("BUF_WRITE: b_slice len %?", - vec::len(b_slice)); + b_slice.len()); w.write(b_slice) } } @@ -1810,7 +1810,7 @@ mod test { fn buf_read(r: &R, len: uint) -> ~str { let new_bytes = (*r).read_bytes(len); debug!("in buf_read.. new_bytes len: %?", - vec::len(new_bytes)); + new_bytes.len()); str::from_bytes(new_bytes) } @@ -1863,7 +1863,7 @@ mod test { result::Ok(data) => { debug!("SERVER: got REQ str::from_bytes.."); debug!("SERVER: REQ data len: %?", - vec::len(data)); + data.len()); server_ch.send( str::from_bytes(data)); debug!("SERVER: before write"); diff --git a/src/libstd/par.rs b/src/libstd/par.rs index cf0eba9d30c..d1af484cb22 100644 --- a/src/libstd/par.rs +++ b/src/libstd/par.rs @@ -58,9 +58,8 @@ fn map_slices( info!("pre-slice: %?", (base, slice)); let slice : &[A] = cast::transmute(slice); - info!("slice: %?", - (base, vec::len(slice), end - base)); - assert!((vec::len(slice) == end - base)); + info!("slice: %?", (base, slice.len(), end - base)); + assert!(slice.len() == end - base); f(base, slice) } }; diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs index 2fa12809db6..9afa7262ce4 100644 --- a/src/libstd/rope.rs +++ b/src/libstd/rope.rs @@ -164,7 +164,7 @@ pub fn append_rope(left: Rope, right: Rope) -> Rope { */ pub fn concat(v: ~[Rope]) -> Rope { //Copy `v` into a mut vector - let mut len = vec::len(v); + let mut len = v.len(); if len == 0u { return node::Empty; } let mut ropes = vec::from_elem(len, v[0]); for uint::range(1u, len) |i| { @@ -770,7 +770,7 @@ pub mod node { */ pub fn tree_from_forest_destructive(forest: &mut [@Node]) -> @Node { let mut i; - let mut len = vec::len(forest); + let mut len = forest.len(); while len > 1u { i = 0u; while i < len - 1u {//Concat nodes 0 with 1, 2 with 3 etc. diff --git a/src/libstd/sha1.rs b/src/libstd/sha1.rs index 4b410ebfdd2..6d8bf20d837 100644 --- a/src/libstd/sha1.rs +++ b/src/libstd/sha1.rs @@ -90,8 +90,8 @@ pub fn sha1() -> @Sha1 { } } fn process_msg_block(st: &mut Sha1State) { - assert!((vec::len(st.h) == digest_buf_len)); - assert!((vec::uniq_len(st.work_buf) == work_buf_len)); + assert!(st.h.len() == digest_buf_len); + assert!(vec::uniq_len(st.work_buf) == work_buf_len); let mut t: int; // Loop counter let w = st.work_buf; @@ -230,7 +230,7 @@ pub fn sha1() -> @Sha1 { impl Sha1 for Sha1State { fn reset(&mut self) { - assert!((vec::len(self.h) == digest_buf_len)); + assert!(self.h.len() == digest_buf_len); self.len_low = 0u32; self.len_high = 0u32; self.msg_block_idx = 0u; diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs index 59c6a804408..449edacad32 100644 --- a/src/libstd/sync.rs +++ b/src/libstd/sync.rs @@ -19,7 +19,6 @@ use core::unstable::sync::{Exclusive, exclusive}; use core::ptr; use core::task; use core::util; -use core::vec; /**************************************************************************** * Internals @@ -220,7 +219,7 @@ pub impl<'self> Condvar<'self> { do task::unkillable { // Release lock, 'atomically' enqueuing ourselves in so doing. do (**self.sem).with |state| { - if condvar_id < vec::len(state.blocked) { + if condvar_id < state.blocked.len() { // Drop the lock. state.count += 1; if state.count <= 0 { @@ -230,7 +229,7 @@ pub impl<'self> Condvar<'self> { let SignalEnd = SignalEnd.swap_unwrap(); state.blocked[condvar_id].tail.send(SignalEnd); } else { - out_of_bounds = Some(vec::len(state.blocked)); + out_of_bounds = Some(state.blocked.len()); } } @@ -285,10 +284,10 @@ pub impl<'self> Condvar<'self> { let mut out_of_bounds = None; let mut result = false; do (**self.sem).with |state| { - if condvar_id < vec::len(state.blocked) { + if condvar_id < state.blocked.len() { result = signal_waitqueue(&state.blocked[condvar_id]); } else { - out_of_bounds = Some(vec::len(state.blocked)); + out_of_bounds = Some(state.blocked.len()); } } do check_cvar_bounds(out_of_bounds, condvar_id, "cond.signal_on()") { @@ -304,14 +303,14 @@ pub impl<'self> Condvar<'self> { let mut out_of_bounds = None; let mut queue = None; do (**self.sem).with |state| { - if condvar_id < vec::len(state.blocked) { + if condvar_id < state.blocked.len() { // To avoid :broadcast_heavy, we make a new waitqueue, // swap it out with the old one, and broadcast on the // old one outside of the little-lock. queue = Some(util::replace(&mut state.blocked[condvar_id], new_waitqueue())); } else { - out_of_bounds = Some(vec::len(state.blocked)); + out_of_bounds = Some(state.blocked.len()); } } do check_cvar_bounds(out_of_bounds, condvar_id, "cond.signal_on()") { diff --git a/src/libstd/test.rs b/src/libstd/test.rs index 78f46b4ca03..b2f73df316d 100644 --- a/src/libstd/test.rs +++ b/src/libstd/test.rs @@ -144,7 +144,7 @@ pub fn parse_opts(args: &[~str]) -> OptRes { }; let filter = - if vec::len(matches.free) > 0 { + if matches.free.len() > 0 { option::Some(copy (matches).free[0]) } else { option::None }; @@ -901,7 +901,7 @@ mod tests { ]; let filtered = filter_tests(&opts, tests); - assert!((vec::len(filtered) == 1)); + assert!(filtered.len() == 1); assert!((filtered[0].desc.name.to_str() == ~"1")); assert!((filtered[0].desc.ignore == false)); } diff --git a/src/libstd/uv_ll.rs b/src/libstd/uv_ll.rs index a14c048b8de..37052f7d1b7 100644 --- a/src/libstd/uv_ll.rs +++ b/src/libstd/uv_ll.rs @@ -1358,7 +1358,7 @@ mod test { let req_msg_ptr: *u8 = vec::raw::to_ptr(req_str_bytes); debug!("req_msg ptr: %u", req_msg_ptr as uint); let req_msg = ~[ - buf_init(req_msg_ptr, vec::len(req_str_bytes)) + buf_init(req_msg_ptr, req_str_bytes.len()) ]; // this is the enclosing record, we'll pass a ptr to // this to C.. diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs index 6b2aa2416f8..993fa612a27 100644 --- a/src/libsyntax/diagnostic.rs +++ b/src/libsyntax/diagnostic.rs @@ -232,7 +232,7 @@ fn highlight_lines(cm: @codemap::CodeMap, let max_lines = 6u; let mut elided = false; let mut display_lines = /* FIXME (#2543) */ copy lines.lines; - if vec::len(display_lines) > max_lines { + if display_lines.len() > max_lines { display_lines = vec::slice(display_lines, 0u, max_lines).to_vec(); elided = true; } @@ -243,7 +243,7 @@ fn highlight_lines(cm: @codemap::CodeMap, io::stderr().write_str(s); } if elided { - let last_line = display_lines[vec::len(display_lines) - 1u]; + let last_line = display_lines[display_lines.len() - 1u]; let s = fmt!("%s:%u ", fm.name, last_line + 1u); let mut indent = str::len(s); let mut out = ~""; @@ -254,7 +254,7 @@ fn highlight_lines(cm: @codemap::CodeMap, // FIXME (#3260) // If there's one line at fault we can easily point to the problem - if vec::len(lines.lines) == 1u { + if lines.lines.len() == 1u { let lo = cm.lookup_char_pos(sp.lo); let mut digits = 0u; let mut num = (lines.lines[0] + 1u) / 10u; diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index ac86d266d73..2283802208a 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -824,7 +824,7 @@ fn mk_struct_ser_impl( cx.ident_of("emit_struct"), ~[ cx.lit_str(span, @cx.str_of(ident)), - cx.lit_uint(span, vec::len(fields)), + cx.lit_uint(span, fields.len()), cx.lambda_stmts_1(span, fields, cx.ident_of("__s")), ] ); @@ -886,7 +886,7 @@ fn mk_struct_deser_impl( cx.ident_of("read_struct"), ~[ cx.lit_str(span, @cx.str_of(ident)), - cx.lit_uint(span, vec::len(fields)), + cx.lit_uint(span, fields.len()), cx.lambda_expr_1( cx.expr( span, diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 20bf01c0dc1..30470d2ebe7 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -351,7 +351,7 @@ pub fn expr_to_ident(cx: @ext_ctxt, err_msg: &str) -> ast::ident { match expr.node { ast::expr_path(p) => { - if vec::len(p.types) > 0u || vec::len(p.idents) != 1u { + if p.types.len() > 0u || p.idents.len() != 1u { cx.span_fatal(expr.span, err_msg); } return p.idents[0]; diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index fa91b968f69..89873b27935 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -276,7 +276,7 @@ fn read_block_comment(rdr: @mut StringReader, let mut style = if code_to_the_left { trailing } else { isolated }; consume_non_eol_whitespace(rdr); - if !is_eof(rdr) && rdr.curr != '\n' && vec::len(lines) == 1u { + if !is_eof(rdr) && rdr.curr != '\n' && lines.len() == 1u { style = mixed; } debug!("<<< block comment"); diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index e1fe20695c7..db3f407ccc1 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2471,7 +2471,7 @@ pub impl Parser { } }, _ => { - if vec::len(enum_path.idents)==1u { + if enum_path.idents.len()==1u { // it could still be either an enum // or an identifier pattern, resolve // will sort it out: @@ -4337,7 +4337,7 @@ pub impl Parser { } _ => () } - let last = path[vec::len(path) - 1u]; + let last = path[path.len() - 1u]; let path = @ast::Path { span: mk_sp(lo, self.span.hi), global: false, idents: path, diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index 7944469cb96..38c58612f43 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -110,8 +110,8 @@ pub fn tok_str(t: token) -> ~str { pub fn buf_str(toks: ~[token], szs: ~[int], left: uint, right: uint, lim: uint) -> ~str { - let n = vec::len(toks); - assert!(n == vec::len(szs)); + let n = toks.len(); + assert!(n == szs.len()); let mut i = left; let mut L = lim; let mut s = ~"["; diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 1e94c16f87a..4ba079fd65a 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1798,7 +1798,7 @@ pub fn print_meta_item(s: @ps, item: @ast::meta_item) { pub fn print_view_path(s: @ps, vp: @ast::view_path) { match vp.node { ast::view_path_simple(ident, path, _) => { - if path.idents[vec::len(path.idents)-1u] != ident { + if path.idents[path.idents.len()-1u] != ident { print_ident(s, ident); space(s.s); word_space(s, ~"="); @@ -2067,7 +2067,7 @@ pub fn maybe_print_comment(s: @ps, pos: BytePos) { pub fn print_comment(s: @ps, cmnt: &comments::cmnt) { match cmnt.style { comments::mixed => { - assert!((vec::len(cmnt.lines) == 1u)); + assert!(cmnt.lines.len() == 1u); zerobreak(s.s); word(s.s, cmnt.lines[0]); zerobreak(s.s); @@ -2083,7 +2083,7 @@ pub fn print_comment(s: @ps, cmnt: &comments::cmnt) { } comments::trailing => { word(s.s, ~" "); - if vec::len(cmnt.lines) == 1u { + if cmnt.lines.len() == 1u { word(s.s, cmnt.lines[0]); hardbreak(s.s); } else { diff --git a/src/test/auxiliary/cci_iter_lib.rs b/src/test/auxiliary/cci_iter_lib.rs index e44267373ef..a264c7d238f 100644 --- a/src/test/auxiliary/cci_iter_lib.rs +++ b/src/test/auxiliary/cci_iter_lib.rs @@ -13,7 +13,7 @@ #[inline] pub fn iter(v: &[T], f: &fn(&T)) { let mut i = 0u; - let n = vec::len(v); + let n = v.len(); while i < n { f(&v[i]); i += 1u; diff --git a/src/test/auxiliary/cci_no_inline_lib.rs b/src/test/auxiliary/cci_no_inline_lib.rs index f79227d87cd..fbdb7806b5e 100644 --- a/src/test/auxiliary/cci_no_inline_lib.rs +++ b/src/test/auxiliary/cci_no_inline_lib.rs @@ -13,7 +13,7 @@ // same as cci_iter_lib, more-or-less, but not marked inline pub fn iter(v: ~[uint], f: &fn(uint)) { let mut i = 0u; - let n = vec::len(v); + let n = v.len(); while i < n { f(v[i]); i += 1u; diff --git a/src/test/bench/graph500-bfs.rs b/src/test/bench/graph500-bfs.rs index 6fd31aa7b9f..ddf6f4bfc55 100644 --- a/src/test/bench/graph500-bfs.rs +++ b/src/test/bench/graph500-bfs.rs @@ -126,7 +126,7 @@ fn gen_search_keys(graph: &[~[node_id]], n: uint) -> ~[node_id] { */ fn bfs(graph: graph, key: node_id) -> bfs_result { let mut marks : ~[node_id] - = vec::from_elem(vec::len(graph), -1i64); + = vec::from_elem(graph.len(), -1i64); let mut q = Deque::new(); @@ -429,7 +429,7 @@ fn main() { let stop = time::precise_time_s(); io::stdout().write_line(fmt!("Generated %? edges in %? seconds.", - vec::len(edges), stop - start)); + edges.len(), stop - start)); let start = time::precise_time_s(); let graph = make_graph(1 << scale, copy edges); diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs index fa6b7066e40..3c32ec338b7 100644 --- a/src/test/bench/shootout-k-nucleotide-pipes.rs +++ b/src/test/bench/shootout-k-nucleotide-pipes.rs @@ -95,7 +95,7 @@ fn windows_with_carry(bb: &[u8], nn: uint, it: &fn(window: &[u8])) -> ~[u8] { let mut ii = 0u; - let len = vec::len(bb); + let len = bb.len(); while ii < len - (nn - 1u) { it(vec::slice(bb, ii, ii+nn)); ii += 1u; diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs index c383cdf4318..c18c1eaedd6 100644 --- a/src/test/bench/sudoku.rs +++ b/src/test/bench/sudoku.rs @@ -70,7 +70,7 @@ pub impl Sudoku { let line = reader.read_line(); let mut comps = ~[]; for str::each_split_char(line.trim(), ',') |s| { comps.push(s.to_owned()) } - if vec::len(comps) == 3u { + if comps.len() == 3u { let row = uint::from_str(comps[0]).get() as u8; let col = uint::from_str(comps[1]).get() as u8; g[row][col] = uint::from_str(comps[2]).get() as u8; @@ -103,7 +103,7 @@ pub impl Sudoku { } let mut ptr = 0u; - let end = vec::len(work); + let end = work.len(); while (ptr < end) { let (row, col) = work[ptr]; // is there another color to try? @@ -265,7 +265,7 @@ fn check_default_sudoku_solution() { fn main() { let args = os::args(); - let use_default = vec::len(args) == 1u; + let use_default = args.len() == 1u; let mut sudoku = if use_default { Sudoku::from_vec(&default_sudoku) } else { diff --git a/src/test/run-pass/assignability-trait.rs b/src/test/run-pass/assignability-trait.rs index 6946ed3fbcf..b21213bb221 100644 --- a/src/test/run-pass/assignability-trait.rs +++ b/src/test/run-pass/assignability-trait.rs @@ -39,15 +39,15 @@ pub fn main() { // Call a method for x.iterate() |y| { assert!(x[*y] == *y); } // Call a parameterized function - assert!(length(x.clone()) == vec::len(x)); + assert!(length(x.clone()) == x.len()); // Call a parameterized function, with type arguments that require // a borrow - assert!(length::(x) == vec::len(x)); + assert!(length::(x) == x.len()); // Now try it with a type that *needs* to be borrowed let z = [0,1,2,3]; // Call a method for z.iterate() |y| { assert!(z[*y] == *y); } // Call a parameterized function - assert!(length::(z) == vec::len(z)); + assert!(length::(z) == z.len()); } diff --git a/src/test/run-pass/class-implements-multiple-traits.rs b/src/test/run-pass/class-implements-multiple-traits.rs index 3a5bd648639..61dfcfed7bd 100644 --- a/src/test/run-pass/class-implements-multiple-traits.rs +++ b/src/test/run-pass/class-implements-multiple-traits.rs @@ -103,7 +103,7 @@ fn annoy_neighbors(critter: T) { fn bite_everything(critter: T) -> bool { let mut left : ~[body_part] = ~[finger, toe, nose, ear]; - while vec::len(left) > 0u { + while left.len() > 0u { let part = critter.bite(); debug!("%? %?", left, part); if vec_includes(left, part) { diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index bca4cbafc6c..c6ae2047147 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -71,7 +71,7 @@ mod map_reduce { start_mappers(ctrl_chan, inputs.clone()); - let mut num_mappers = vec::len(inputs) as int; + let mut num_mappers = inputs.len() as int; while num_mappers > 0 { match ctrl_port.recv() { diff --git a/src/test/run-pass/vec-self-append.rs b/src/test/run-pass/vec-self-append.rs index acd9cf6f01b..7507a78378e 100644 --- a/src/test/run-pass/vec-self-append.rs +++ b/src/test/run-pass/vec-self-append.rs @@ -14,7 +14,7 @@ fn test_heap_to_heap() { // a spills onto the heap let mut a = ~[0, 1, 2, 3, 4]; a = a + a; // FIXME(#3387)---can't write a += a - assert!((vec::len(a) == 10u)); + assert!(a.len() == 10u); assert!((a[0] == 0)); assert!((a[1] == 1)); assert!((a[2] == 2)); @@ -32,7 +32,7 @@ fn test_stack_to_heap() { let mut a = ~[0, 1, 2]; // a spills to the heap a = a + a; // FIXME(#3387)---can't write a += a - assert!((vec::len(a) == 6u)); + assert!(a.len() == 6u); assert!((a[0] == 0)); assert!((a[1] == 1)); assert!((a[2] == 2)); @@ -47,8 +47,8 @@ fn test_loop() { let mut i = 20; let mut expected_len = 1u; while i > 0 { - error!(vec::len(a)); - assert!((vec::len(a) == expected_len)); + error!(a.len()); + assert!(a.len() == expected_len); a = a + a; // FIXME(#3387)---can't write a += a i -= 1; expected_len *= 2u;