auto merge of #6487 : recrack/rust/vec_len, r=thestinger
Rename vec::len(var) to var.len() ``` libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax test/auxiliary test/bench test/run-pass ```
This commit is contained in:
commit
4e82610099
58 changed files with 128 additions and 134 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue