1
Fork 0

std: Move raw to std::raw

Issue #1457
This commit is contained in:
Brian Anderson 2014-02-16 00:04:33 -08:00
parent 4d10bdc5b9
commit 3e57808a01
19 changed files with 22 additions and 19 deletions

View file

@ -13,7 +13,7 @@ use std::cast::{transmute, transmute_mut_unsafe,
transmute_region, transmute_mut_region}; transmute_region, transmute_mut_region};
use stack::Stack; use stack::Stack;
use std::unstable::stack; use std::unstable::stack;
use std::unstable::raw; use std::raw;
// FIXME #7761: Registers is boxed so that it is 16-byte aligned, for storing // FIXME #7761: Registers is boxed so that it is 16-byte aligned, for storing
// SSE regs. It would be marginally better not to do this. In C++ we // SSE regs. It would be marginally better not to do this. In C++ we

View file

@ -16,7 +16,7 @@ use std::rt::task::BlockedTask;
use std::rt::task::Task; use std::rt::task::Task;
use std::sync::deque; use std::sync::deque;
use std::unstable::mutex::NativeMutex; use std::unstable::mutex::NativeMutex;
use std::unstable::raw; use std::raw;
use TaskState; use TaskState;
use context::Context; use context::Context;

View file

@ -26,7 +26,7 @@ use std::rt::rtio;
use std::rt::task::{Task, BlockedTask, SendMessage}; use std::rt::task::{Task, BlockedTask, SendMessage};
use std::task::TaskOpts; use std::task::TaskOpts;
use std::unstable::mutex::NativeMutex; use std::unstable::mutex::NativeMutex;
use std::unstable::raw; use std::raw;
use context::Context; use context::Context;
use coroutine::Coroutine; use coroutine::Coroutine;

View file

@ -22,7 +22,7 @@ use std::libc;
use std::os; use std::os;
use std::run::{ProcessOptions, Process, ProcessOutput}; use std::run::{ProcessOptions, Process, ProcessOutput};
use std::str; use std::str;
use std::unstable::raw; use std::raw;
use extra::tempfile::TempDir; use extra::tempfile::TempDir;
use syntax::abi; use syntax::abi;

View file

@ -79,7 +79,7 @@ use str;
use vec::{ImmutableVector, MutableVector}; use vec::{ImmutableVector, MutableVector};
use vec; use vec;
use rt::global_heap::malloc_raw; use rt::global_heap::malloc_raw;
use unstable::raw::Slice; use raw::Slice;
/// The representation of a C String. /// The representation of a C String.
/// ///

View file

@ -113,7 +113,7 @@ pub unsafe fn copy_lifetime_vec<'a,S,T>(_ptr: &'a [S], ptr: &T) -> &'a T {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use cast::{bump_box_refcount, transmute}; use cast::{bump_box_refcount, transmute};
use unstable::raw; use raw;
#[test] #[test]
fn test_transmute_copy() { fn test_transmute_copy() {

View file

@ -11,7 +11,7 @@
#[doc(hidden)]; #[doc(hidden)];
use ptr; use ptr;
use unstable::raw; use raw;
static RC_IMMORTAL : uint = 0x77777777; static RC_IMMORTAL : uint = 0x77777777;

View file

@ -198,6 +198,8 @@ pub mod reflect;
pub mod unstable; pub mod unstable;
#[experimental] #[experimental]
pub mod intrinsics; pub mod intrinsics;
#[experimental]
pub mod raw;
/* For internal use, not exported */ /* For internal use, not exported */

View file

@ -15,7 +15,7 @@
/// Returns the refcount of a shared box (as just before calling this) /// Returns the refcount of a shared box (as just before calling this)
#[inline] #[inline]
pub fn refcount<T>(t: @T) -> uint { pub fn refcount<T>(t: @T) -> uint {
use unstable::raw::Repr; use raw::Repr;
unsafe { (*t.repr()).ref_count - 1 } unsafe { (*t.repr()).ref_count - 1 }
} }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(missing_doc)];
use cast; use cast;
/// The representation of a Rust managed box /// The representation of a Rust managed box

View file

@ -18,7 +18,7 @@ Runtime type reflection
use intrinsics::{Disr, Opaque, TyDesc, TyVisitor}; use intrinsics::{Disr, Opaque, TyDesc, TyVisitor};
use mem; use mem;
use unstable::raw; use raw;
/** /**
* Trait for visitor that wishes to reflect on data. To use this, create a * Trait for visitor that wishes to reflect on data. To use this, create a

View file

@ -30,7 +30,7 @@ use str::StrSlice;
use to_str::ToStr; use to_str::ToStr;
use vec::OwnedVector; use vec::OwnedVector;
use intrinsics::{Disr, Opaque, TyDesc, TyVisitor, get_tydesc, visit_tydesc}; use intrinsics::{Disr, Opaque, TyDesc, TyVisitor, get_tydesc, visit_tydesc};
use unstable::raw; use raw;
macro_rules! try( ($me:expr, $e:expr) => ( macro_rules! try( ($me:expr, $e:expr) => (
match $e { match $e {

View file

@ -11,7 +11,7 @@
use libc::{c_void, size_t, free, malloc, realloc}; use libc::{c_void, size_t, free, malloc, realloc};
use ptr::{RawPtr, mut_null}; use ptr::{RawPtr, mut_null};
use intrinsics::abort; use intrinsics::abort;
use unstable::raw; use raw;
use mem::size_of; use mem::size_of;
#[inline] #[inline]

View file

@ -20,7 +20,7 @@ use ptr::RawPtr;
use rt::global_heap; use rt::global_heap;
use rt::local::Local; use rt::local::Local;
use rt::task::Task; use rt::task::Task;
use unstable::raw; use raw;
use vec::ImmutableVector; use vec::ImmutableVector;
use vec_ng::Vec; use vec_ng::Vec;

View file

@ -177,7 +177,7 @@ impl Unwinder {
} }
pub fn try(&mut self, f: ||) { pub fn try(&mut self, f: ||) {
use unstable::raw::Closure; use raw::Closure;
use libc::{c_void}; use libc::{c_void};
unsafe { unsafe {

View file

@ -104,7 +104,7 @@ use vec::{OwnedVector, OwnedCloneableVector, ImmutableVector, MutableVector};
use vec_ng::Vec; use vec_ng::Vec;
use default::Default; use default::Default;
use to_bytes::{IterBytes, Cb}; use to_bytes::{IterBytes, Cb};
use unstable::raw::Repr; use raw::Repr;
/* /*
Section: Creating a string Section: Creating a string
@ -1386,7 +1386,7 @@ pub mod raw {
use str::{is_utf8, OwnedStr, StrSlice}; use str::{is_utf8, OwnedStr, StrSlice};
use vec; use vec;
use vec::{MutableVector, ImmutableVector, OwnedVector}; use vec::{MutableVector, ImmutableVector, OwnedVector};
use unstable::raw::Slice; use raw::Slice;
/// Create a Rust string from a *u8 buffer of the given length /// Create a Rust string from a *u8 buffer of the given length
pub unsafe fn from_buf_len(buf: *u8, len: uint) -> ~str { pub unsafe fn from_buf_len(buf: *u8, len: uint) -> ~str {

View file

@ -21,7 +21,6 @@ pub mod simd;
pub mod lang; pub mod lang;
pub mod sync; pub mod sync;
pub mod mutex; pub mod mutex;
pub mod raw;
pub mod stack; pub mod stack;
/** /**

View file

@ -122,7 +122,7 @@ use mem::size_of;
use kinds::marker; use kinds::marker;
use uint; use uint;
use unstable::finally::try_finally; use unstable::finally::try_finally;
use unstable::raw::{Repr, Slice, Vec}; use raw::{Repr, Slice, Vec};
/** /**
* Creates and initializes an owned vector. * Creates and initializes an owned vector.
@ -2488,7 +2488,7 @@ pub mod raw {
use ptr; use ptr;
use ptr::RawPtr; use ptr::RawPtr;
use vec::{with_capacity, MutableVector, OwnedVector}; use vec::{with_capacity, MutableVector, OwnedVector};
use unstable::raw::Slice; use raw::Slice;
/** /**
* Form a slice from a pointer and length (as a number of units, * Form a slice from a pointer and length (as a number of units,

View file

@ -24,7 +24,7 @@ use option::{None, Option, Some};
use ptr::RawPtr; use ptr::RawPtr;
use ptr; use ptr;
use rt::global_heap::{malloc_raw, realloc_raw}; use rt::global_heap::{malloc_raw, realloc_raw};
use unstable::raw::Slice; use raw::Slice;
use vec::{ImmutableVector, Items, MutItems, MutableVector, RevItems}; use vec::{ImmutableVector, Items, MutItems, MutableVector, RevItems};
pub struct Vec<T> { pub struct Vec<T> {