Added string duplication to deep_copy. Closes #520.

This commit is contained in:
Eric Holk 2011-06-20 13:46:44 -07:00
parent c051501784
commit a2dcd08cc2
6 changed files with 59 additions and 25 deletions

View file

@ -168,6 +168,7 @@ export type_is_sequence;
export type_is_signed;
export type_is_structural;
export type_is_tup_like;
export type_is_str;
export type_owns_heap_mem;
export type_param;
export unify;
@ -899,6 +900,13 @@ fn type_is_sequence(&ctxt cx, &t ty) -> bool {
}
}
fn type_is_str(&ctxt cx, &t ty) -> bool {
alt (struct(cx, ty)) {
case (ty_str) { ret true; }
case (_) { ret false; }
}
}
fn sequence_is_interior(&ctxt cx, &t ty) -> bool {
alt (struct(cx, ty)) {
case (