about summary refs log tree commit diff
path: root/src/libstd/at_vec.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-06-25 04:38:06 -0700
committerbors <bors@rust-lang.org>2013-06-25 04:38:06 -0700
commit7aee5da08db11dc597907bf228c2e716a408fdab (patch)
tree7217207f8ec916aca96034f94d64a15746e22f79 /src/libstd/at_vec.rs
parentb11346bb5d2659313eb96f3108137f01239785c9 (diff)
parentf8ae3cdcaacb29c7b56e546a9ddab1396b615f8f (diff)
auto merge of #7254 : Blei/rust/intrinsic-overhaul, r=cmr
This sets the `get_tydesc()` return type correctly and removes the intrinsic module. See #3730, #3475.

Update: this now also removes the unused shape fields in tydescs.
Diffstat (limited to 'src/libstd/at_vec.rs')
-rw-r--r--src/libstd/at_vec.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/libstd/at_vec.rs b/src/libstd/at_vec.rs
index b871ed3d57a..5a2f948600a 100644
--- a/src/libstd/at_vec.rs
+++ b/src/libstd/at_vec.rs
@@ -25,13 +25,16 @@ use vec::ImmutableVector;
 
 pub mod rustrt {
     use libc;
-    use sys;
     use vec;
+    #[cfg(stage0)]
+    use intrinsic::{TyDesc};
+    #[cfg(not(stage0))]
+    use unstable::intrinsics::{TyDesc};
 
     #[abi = "cdecl"]
     #[link_name = "rustrt"]
     pub extern {
-        pub unsafe fn vec_reserve_shared_actual(t: *sys::TypeDesc,
+        pub unsafe fn vec_reserve_shared_actual(t: *TyDesc,
                                                 v: **vec::raw::VecRepr,
                                                 n: libc::size_t);
     }
@@ -197,6 +200,10 @@ pub mod raw {
     use uint;
     use unstable::intrinsics::{move_val_init};
     use vec;
+    #[cfg(stage0)]
+    use intrinsic::{get_tydesc};
+    #[cfg(not(stage0))]
+    use unstable::intrinsics::{get_tydesc};
 
     pub type VecRepr = vec::raw::VecRepr;
     pub type SliceRepr = vec::raw::SliceRepr;
@@ -258,7 +265,7 @@ pub mod raw {
         // Only make the (slow) call into the runtime if we have to
         if capacity(*v) < n {
             let ptr: **VecRepr = transmute(v);
-            rustrt::vec_reserve_shared_actual(sys::get_type_desc::<T>(),
+            rustrt::vec_reserve_shared_actual(get_tydesc::<T>(),
                                               ptr, n as libc::size_t);
         }
     }