Convert many libsyntax records into structs
Specifically:
ast_map::ctx
ast_util::id_range
diagnostic::{handler_t,codemap_t}
auto_encode::field
ext::base::{macro_def,syntax_expander_tt,syntax_expander_tt_item}
ext::pipes::proto::next_state
This commit is contained in:
committed by
Tim Chevalier
parent
28da4ecdaa
commit
7f2c399f3a
@@ -455,7 +455,10 @@ fn dtor_dec() -> fn_decl {
|
||||
|
||||
#[auto_encode]
|
||||
#[auto_decode]
|
||||
type id_range = {min: node_id, max: node_id};
|
||||
struct id_range {
|
||||
min: node_id,
|
||||
max: node_id,
|
||||
}
|
||||
|
||||
fn empty(range: id_range) -> bool {
|
||||
range.min >= range.max
|
||||
@@ -596,7 +599,7 @@ fn compute_id_range(visit_ids_fn: fn(fn@(node_id))) -> id_range {
|
||||
*min = int::min(*min, id);
|
||||
*max = int::max(*max, id + 1);
|
||||
}
|
||||
return {min:*min, max:*max};
|
||||
id_range { min: *min, max: *max }
|
||||
}
|
||||
|
||||
fn compute_id_range_for_inlined_item(item: inlined_item) -> id_range {
|
||||
|
||||
Reference in New Issue
Block a user