diff options
| author | Michael Sullivan <sully@msully.net> | 2012-06-22 11:23:54 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2012-06-22 11:23:54 -0700 |
| commit | 986662cebd3f41911cb72c18f4e824a4856b009b (patch) | |
| tree | c8bc45e4f82f802a9400af1028b16fc519d5dce8 /src/rustc | |
| parent | b8710de5fffdc45c19ccc27ad8ed98c1ee51c025 (diff) | |
| download | rust-986662cebd3f41911cb72c18f4e824a4856b009b.tar.gz rust-986662cebd3f41911cb72c18f4e824a4856b009b.zip | |
Make the implicit copyability of []/~ configurable, like [] is, since we will be switching sooner rather than later.
Diffstat (limited to 'src/rustc')
| -rw-r--r-- | src/rustc/middle/ty.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/rustc/middle/ty.rs b/src/rustc/middle/ty.rs index 3083563d220..6663413d34d 100644 --- a/src/rustc/middle/ty.rs +++ b/src/rustc/middle/ty.rs @@ -1496,7 +1496,7 @@ fn type_kind(cx: ctxt, ty: t) -> kind { ty_nil | ty_bot | ty_bool | ty_int(_) | ty_uint(_) | ty_float(_) | ty_ptr(_) { kind_implicitly_sendable() | kind_const() } // Implicit copyability of strs is configurable - ty_str { + ty_str | ty_estr(vstore_uniq) { if cx.vecs_implicitly_copyable { kind_implicitly_sendable() | kind_const() } else { kind_sendable() | kind_const() } @@ -1526,7 +1526,7 @@ fn type_kind(cx: ctxt, ty: t) -> kind { remove_implicit(mutable_type_kind(cx, tm)) } // Implicit copyability of vecs is configurable - ty_vec(tm) { + ty_vec(tm) | ty_evec(tm, vstore_uniq) { if cx.vecs_implicitly_copyable { mutable_type_kind(cx, tm) } else { remove_implicit(mutable_type_kind(cx, tm)) } @@ -1544,9 +1544,6 @@ fn type_kind(cx: ctxt, ty: t) -> kind { kind_implicitly_copyable() } } - ty_evec(tm, vstore_uniq) { - remove_implicit(mutable_type_kind(cx, tm)) - } ty_evec(tm, vstore_fixed(_)) { mutable_type_kind(cx, tm) } @@ -1554,7 +1551,6 @@ fn type_kind(cx: ctxt, ty: t) -> kind { // All estrs are copyable; uniques and interiors are sendable. ty_estr(vstore_box) | ty_estr(vstore_slice(_)) { kind_implicitly_copyable() | kind_const() } - ty_estr(vstore_uniq) { kind_sendable() | kind_const() } ty_estr(vstore_fixed(_)) { kind_implicitly_sendable() | kind_const() } // Records lower to the lowest of their members. |
