rustc: Translate tuple struct constructors

This commit is contained in:
Patrick Walton
2012-10-24 14:36:00 -07:00
parent ce23a99925
commit 599b4208fb
13 changed files with 193 additions and 49 deletions

View File

@@ -589,6 +589,12 @@ fn view_path_id(p: @view_path) -> node_id {
}
}
/// Returns true if the given struct def is tuple-like; i.e. that its fields
/// are unnamed.
fn struct_def_is_tuple_like(struct_def: @ast::struct_def) -> bool {
struct_def.ctor_id.is_some()
}
// Local Variables:
// mode: rust
// fill-column: 78;