std: rename {read,emit}_field to {read,emit}_struct_field
This commit is contained in:
parent
97cc571358
commit
419f6acf0e
5 changed files with 183 additions and 10 deletions
|
@ -732,12 +732,12 @@ fn mk_struct_ser_impl(
|
|||
)
|
||||
);
|
||||
|
||||
// ast for `__s.emit_field($(name), $(idx), $(expr_lambda))`
|
||||
// ast for `__s.emit_struct_field($(name), $(idx), $(expr_lambda))`
|
||||
cx.stmt(
|
||||
cx.expr_method_call(
|
||||
span,
|
||||
cx.expr_var(span, ~"__s"),
|
||||
cx.ident_of(~"emit_field"),
|
||||
cx.ident_of(~"emit_struct_field"),
|
||||
~[
|
||||
cx.lit_str(span, @cx.str_of(field.ident)),
|
||||
cx.lit_uint(span, idx),
|
||||
|
@ -786,11 +786,11 @@ fn mk_struct_deser_impl(
|
|||
)
|
||||
);
|
||||
|
||||
// ast for `__d.read_field($(name), $(idx), $(expr_lambda))`
|
||||
// ast for `__d.read_struct_field($(name), $(idx), $(expr_lambda))`
|
||||
let expr: @ast::expr = cx.expr_method_call(
|
||||
span,
|
||||
cx.expr_var(span, ~"__d"),
|
||||
cx.ident_of(~"read_field"),
|
||||
cx.ident_of(~"read_struct_field"),
|
||||
~[
|
||||
cx.lit_str(span, @cx.str_of(field.ident)),
|
||||
cx.lit_uint(span, idx),
|
||||
|
@ -1256,7 +1256,7 @@ mod test {
|
|||
fn emit_struct(&self, name: &str, +len: uint, f: &fn()) {
|
||||
self.add_to_log(CallToEmitStruct (name.to_str(),len)); f();
|
||||
}
|
||||
fn emit_field(&self, name: &str, +idx: uint, f: &fn()) {
|
||||
fn emit_struct_field(&self, name: &str, +idx: uint, f: &fn()) {
|
||||
self.add_to_log(CallToEmitField (name.to_str(),idx)); f();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue